Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate OpenAPI 3 into Dredd #71

Open
1 task
kylef opened this issue Dec 11, 2018 · 3 comments
Open
1 task

Integrate OpenAPI 3 into Dredd #71

kylef opened this issue Dec 11, 2018 · 3 comments
Labels
enhancement New feature or request openapi3

Comments

@kylef
Copy link
Member

kylef commented Dec 11, 2018

This issue is tracking integrating OpenAPI 3 support into Dredd.

Caveats

The current support is not finished but we want to get OpenAPI 3 to you as quick as we can. We're doing this in the open which allows you to follow the progress, give us early feedback and allows you to contribute desired functionality.

There are some caveats with Dredd support in the current release, most should be addressed next week:

  • Validation of response body is done from an example value(s) in content. Includes schemas are not used for validation.

See below for a working example of current functionality.

Important Missing Functionality

See our status page for furher information on supported functionality.

Examples

Success
openapi: '3.0.0'
info:
  title: HTTPBin
  version: 0.1.0
paths:
  /get:
    get:
      responses:
        '200':
          content:
            application/json:
              example:
                args: {}
                headers:
                  Connection: close
                  Host: httpbin.org
                  User-Agent: Dredd/0.0.0-semantically-released (Darwin 18.2.0; x64)
                origin: '::1'
                url: https://httpbin.org/get
$ dredd httpbin.yaml https://httpbin.org/
info: Beginning Dredd testing...
info: Found Hookfiles:
pass: GET (200) /get duration: 526ms
complete: 1 passing, 0 failing, 0 errors, 0 skipped, 1 total
complete: Tests took 529ms
Failure
openapi: '3.0.0'
info:
  title: HTTPBin
  version: 0.1.0
paths:
  /get:
    get:
      responses:
        '200':
          content:
            application/json:
              example:
                something: that is not found in response
$ dredd httpbin-failure.yaml  https://httpbin.org/
info: Beginning Dredd testing...
info: Found Hookfiles:
fail: GET (200) /get duration: 605ms
info: Displaying failed tests...
fail: GET (200) /get duration: 605ms
fail: body: At '/something' Missing required property: something

request:
method: GET
uri: /get
body:



expected:
headers:
    Content-Type: application/json

body:
{
  "something": "else"
}
statusCode: 200


actual:
statusCode: 200

bodyEncoding: utf-8
body:
{
  "args": {},
  "headers": {
    "Connection": "close",
    "Host": "httpbin.org",
    "User-Agent": "Dredd/0.0.0-semantically-released (Darwin 18.2.0; x64)"
  },
  "origin": "81.109.249.166",
  "url": "https://httpbin.org/get"
}



complete: 0 passing, 1 failing, 0 errors, 0 skipped, 1 total
complete: Tests took 609ms
@kylef kylef transferred this issue from another repository Jan 18, 2019
@kylef kylef added the openapi3 label Jan 18, 2019
@kylef kylef added this to the OpenAPI 3 Parser 1.0.0 milestone Jan 18, 2019
honzajavorek added a commit to apiaryio/dredd that referenced this issue Jan 18, 2019
Please see https://github.com/apiaryio/api-elements.js/blob/master/packages/fury-adapter-oas3-parser/STATUS.md for the list of supported features. The support of OpenAPI 3 in Dredd is experimental, beta, early, you name it. It is everything but finished. However, it already works - see apiaryio/api-elements.js#71 The OAS3 adapter is now developed publicly at https://github.com/apiaryio/api-elements.js/tree/master/packages/fury-adapter-oas3-parser and accepts contributions.

Close #894
@kylef kylef pinned this issue Jan 20, 2019
@kylef kylef added the enhancement New feature or request label Jan 20, 2019
@kylef kylef unpinned this issue Mar 5, 2019
@kurko
Copy link

kurko commented May 20, 2020

Can I suggest a checklist in the description so we can follow along how far we've got and how long we still have to go?

@gap777
Copy link

gap777 commented Dec 9, 2020

A checklist would be helpful to understand better the work done, the work remaining, and the status of the OpenAPI3 support.

@dkocich
Copy link

dkocich commented Mar 15, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request openapi3
Projects
None yet
Development

No branches or pull requests

5 participants