Closed hgmich closed 5 years ago
It seems that parsing is done with swagger-parser
. According to their docs (https://github.com/BigstickCarpet/swagger-parser#features) they support Open API 3 in version 5 (at least). This adapter uses version 3. Greenkeeper tried to build it, but failed -> https://github.com/apiaryio/fury-adapter-swagger/pull/194
So there seem to be some breaking changes in the api.
I checked the Breaking Changes between v3 and v4 of swagger-parser
and changed https://github.com/apiaryio/fury-adapter-swagger/blob/master/src/parser.js#L107 from $refs
to external
to comply with the new options. This fixed one test, but 2 more are failing. Regarding these tests:
The failing test are checking this schema: https://github.com/apiaryio/swagger-zoo/blob/master/fixtures/features/swagger/path-reference-typo.yaml
It contains a wrong $ref and the expected error message differs now. Expected is: https://github.com/apiaryio/swagger-zoo/blob/master/fixtures/features/api-elements/path-reference-typo.json#L64
I get a similar error with the exception that a whole file path is included instead of only the fragment #/definitions/Whoops
. I have no idea what the fixture format is about, but it may be useful for someone else to get this going.
@phal0r Upgrading swagger-parser is being tackled in https://github.com/apiaryio/fury-adapter-swagger/pull/158 I believe https://github.com/BigstickCarpet/json-schema-ref-parser/pull/80 is required to finish this. Although, swagger-parser@5.0.2 depends on swagger-schema-official@2.0.0-bab6bed which has some licensing problems which will ultimately block upgrading that dependency. The package.json declares the license is ISC however in the README it says the license is MIT. There is no license file and thus no copyright notice.
$ ls
README.md bower.json package.json schema.json
$ grep license package.json
"license": "ISC",
$ grep -A 2 License README.md
## License
MIT
That said, this adapter will not be responsible for OAS3 parsing. That will be handled in a separate Fury adapter for OAS3 specifically. The architecture of that adapter will likely be different from fury-adapter-swagger.
@kylef Ok, thanks for pointing this out. Has there any work already be done somewhere to follow and maybe help building this?
@kylef Also interested. Is there anywhere we can contribute or track progress to a Fury adapter for OAS3? My understanding from this thread and @honzajavorek's comments is that the @apiaryio/adt team is on it.
@nickrivadeneira We're in preparations of the initial scaffolding and architecture of the adapter. Once that's ready, we plan to continue development publicly to allow contributions and cheering crowds. We'll get back in a moment, stay tuned!
Hey @honzajavorek any news? I would love to help as well!
@juliuszfedyk We're in the process of turning the api-elements.js into a monorepo and the OAS3 adapter stub should soon appear there.
fury-adapter-oas3-parser 0.3.0 is now available. The parser is in early stages so check out the status page to track the current supported functionality. The source is found at https://github.com/apiaryio/api-elements.js/tree/master/packages/fury-adapter-oas3-parser.
Awesome news, thanks for the update!
Experimental OpenAPI 3 support is now available in Dredd v7.1.0 🎉 You can try it out following the examples in https://github.com/apiaryio/api-elements.js/issues/71
Hi,
We were hoping to leverage Dredd in a project spec'd by OpenAPI 3.0 but it seems that this adapter for Swagger schemas is 2.0 only. Are there any current plans to add support or create a fork for OpenAPI 3.0 support?