Comments (8)
Hi, I don't know why the latest swagger-ui use basePath
in service.json
, I read from swagger-core's wiki: https://github.com/wordnik/swagger-core/wiki/1.2-transition#wiki-10--resource-listing:
The resource listing no longer requires a basePath.
Also, as I test, the latest swagger ui's response is:
{
"apiVersion":"1.0.0",
"swaggerVersion":"1.2",
"apis":[
{
"path":"/pet",
"description":"Operations about pets"
},
{
"path":"/user",
"description":"Operations about user"
},
{
"path":"/store",
"description":"Operations about store"
}
],
"authorizations":{
"oauth2":{
"type":"oauth2",
"scopes":[
{
"scope":"write:pets",
"description":"Modify pets in your account"
},
{
"scope":"read:pets",
"description":"Read your pets"
}
],
"grantTypes":{
"implicit":{
"loginEndpoint":{
"url":"http://petstore.swagger.wordnik.com/oauth/dialog"
},
"tokenName":"access_token"
},
"authorization_code":{
"tokenRequestEndpoint":{
"url":"http://petstore.swagger.wordnik.com/oauth/requestToken",
"clientIdName":"client_id",
"clientSecretName":"client_secret"
},
"tokenEndpoint":{
"url":"http://petstore.swagger.wordnik.com/oauth/token",
"tokenName":"auth_code"
}
}
}
}
},
"info":{
"title":"Swagger Sample App",
"description":"This is a sample server Petstore server. You can find out more about Swagger \n at <a href=\"http://swagger.wordnik.com\">http://swagger.wordnik.com</a> or on irc.freenode.net, #swagger. For this sample,\n you can use the api key \"special-key\" to test the authorization filters",
"termsOfServiceUrl":"http://helloreverb.com/terms/",
"contact":"[email protected]",
"license":"Apache 2.0",
"licenseUrl":"http://www.apache.org/licenses/LICENSE-2.0.html"
}
}
There's no basePath
either.
from swagger-maven-plugin.
Hi,
I was confused myself but then I found this:
https://github.com/wordnik/swagger-core/wiki/API-Declaration
There, the listing makes use of a basePath. After I've read this the phrase "does no longer requires" suddenly had a different meaning. It is not unsupported but rather optional in the 1.2 spec.
from swagger-maven-plugin.
Hi, I just add the support for basePath
in service.json
.
Please check if it can work using the 2.1-SNAPSHOT
version.
from swagger-maven-plugin.
Works, thanks a lot!
from swagger-maven-plugin.
Hi,
We just noticed that this issue shows up again with the the plugin version 2.2 and 2.3-SNAPSHOT.
from swagger-maven-plugin.
Hi, do you mean it works on version 2.1 but not work on 2.2+?
from swagger-maven-plugin.
Exactly.
from swagger-maven-plugin.
Thank you for the finding, please try 2.3-SNAPSHOT
from swagger-maven-plugin.
Related Issues (20)
- Plugin not rendering `ExtensionProperty` as a JSON/YAML value
- OpenAPI / Swagger v3 - Forks? HOT 2
- NullPointerException if apiSource/outputFormats is not present HOT 3
- enabledObjectMapperFeatures and disabledObjectMapperFeatures are documented at the wrong configuration level
- log4j Vulnerability in Dependencies HOT 1
- Error with newer Java Version: could not get type for name
- how generate openapi 3.0 file HOT 3
- when support swagger3.0? HOT 2
- Generate Tags for Spring Controllers HOT 2
- Sort paths by summary
- Two Class have same @ApiModel, result in One class modified and swagger.json do not change
- enabledObjectMapperFeatures not found
- -Dswagger.skip=false doesn't trigger plugin HOT 1
- Updating to jakarta.xml.bind >4 doesn't generate anymore the swaggers HOT 9
- When using both ‘@RequestParam’ and ‘@ApiImplicitParam’ at the same time, it will generate duplicate parameters in swagger.json HOT 1
- how to add all api common header,like Authorization, donot add in each api for @headerparams
- Different line endings for generated swagger.json (CRLF) and swagger.yaml (LF) on Windows Git bash
- toggle an option to automatically generate swagger annotations on jax-rs annotated classes
- If ResponseStatus is specified for operation that should be used as default response not 200
- Error on JDK21 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swagger-maven-plugin.