-
Notifications
You must be signed in to change notification settings - Fork 131
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
Feat: Include multiple $ref'd swagger files #467
Feat: Include multiple $ref'd swagger files #467
Conversation
Sorry, but I'm tired today, and I'll provide a summary soon. |
2c4930c
to
d518503
Compare
@kailuowang |
Here is an excerpt from the README No #definitions generated when referencing other Swagger filesBy placing a json or YAML file in example
example description: success Of course, writing Generated {
"paths": {
"/": {
"get": {
"operationId": "index",
"tags": [
"routes"
],
"summary": "Top Page",
"responses": {
"200": {
"description": "success"
}
}
}
}
}
......
} See the following document for information on how to refer to other files by "$ref". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great to me. I like the idea. 🙏
d518503
to
29826c4
Compare
@kailuowang |
Yes I did. |
Thanks! |
@kailuowang |
In my project, the
routes
file is long and there is a lot of content in each document that I would like to see in the Swagger UI.I tried to include the response document in another file, referring to Using $ref, but the
#definitions
were not generated properly.So we created a function to embed the JSON or YAML file in the project referenced by
$ref
.Please check the
README
for the specific changes.I thought about just scanning an external file and generating
#definitions
, but I thought it would be more convenient to have an embedding function, considering that I need to make a good reference to the mainswagger.json
.