You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and the specific content of Category is defined in another file: openapi-petstore-category.yml.
It works well when I use the swagger-codegen-cli to generate spring server, just like java -jar swagger-codegen-cli-3.0.11.jar generate -i ./oas3/root-petstore.yml -l spring -o petstore/test1/
However, if I want to see the APIs information in SwaggerEditor / SwaggerHub, it is allowed to just upload one file. And the root yaml file in SwaggerEditor / SwaggerHub appears the error "Could not resolve reference: Tried to resolve a relative URL , without having a basePath. path 'openapi-petstore-category.yml' basePath: 'undefined'"
Then I attempt to add the file's path in my computer as 'basePath', but it doesn't work.
The text was updated successfully, but these errors were encountered:
SwaggerHub has the concept of domains to store externally referenced components. You'll need to copy the contents of openapi-petstore-category.yml into a domain and update the $ref path to point to that domain.
For example, I define the Category in root yaml file as:
and the specific content of Category is defined in another file: openapi-petstore-category.yml.
It works well when I use the swagger-codegen-cli to generate spring server, just like
java -jar swagger-codegen-cli-3.0.11.jar generate -i ./oas3/root-petstore.yml -l spring -o petstore/test1/
However, if I want to see the APIs information in SwaggerEditor / SwaggerHub, it is allowed to just upload one file. And the root yaml file in SwaggerEditor / SwaggerHub appears the error
"Could not resolve reference: Tried to resolve a relative URL , without having a basePath. path 'openapi-petstore-category.yml' basePath: 'undefined'"
Then I attempt to add the file's path in my computer as 'basePath', but it doesn't work.
The text was updated successfully, but these errors were encountered: