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

Documentation and implementation error #104

Open
dox-op opened this issue Mar 5, 2019 · 0 comments
Open

Documentation and implementation error #104

dox-op opened this issue Mar 5, 2019 · 0 comments

Comments

@dox-op
Copy link

dox-op commented Mar 5, 2019

I'm having troubles understanding why this page http://dapperdox.io/docs/spec-references says, and I quote:

Note that only absolute $ref references are allowed in a Swagger specification. Relative references in JSON files generally do not resolve consistently, because of the concept of what the reference is relative to changes from file to file.

I want to point out that not only absolute $ref is allowed in Swagger specification or better if you intend Swagger specification to be OpenAPI too, but the relative $ref is also allowed as described by the specific standard: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#relativeReferences
I also link the 2.0 version in the same topic https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#reference-object

I encountered this issue reading the docs and just wanted to point it out.
I started reading better the docs after my failed attempt to compile a json which is the root OpenApi definer of my application. It contains the endpoints definitions (aka name and method) and references the body of requests relative to other json in subfolders.

I'll give an example to give a better understanding of the situation. Saying the root OpenApi json definer is OpenApi.json, stored at the same level as the entities folder which contains the definitions of the entities folder.
I started DapperDox.exe giving as --spec-dir the folder in which all of those files are stored and --spec-filename OpenApi.json. The logs say that while reading a (random because it changes every time I launch this command) file contained in the entities something went wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant