path specific URL endpoint using server object url
See original GitHub issueIn below given example, i need to have customized url for the resource “user-enableuser”. i thought in openapi 3.0.0, it can be achieved through server object for each path. Please let me know what i am missing here
"paths": {
"/user-enableuser": {
"post": {
"servers": [{
"url": "https://x.x.x.x/user"
}],
"tags": [
"user"
],
"summary": " ",
"operationId": "user@ENABLE",
"produces": [
"application/xml"
],
"consumes": [
"application/xml"
],
"parameters": [
{
"schema": {},
"description": " ",
"name": "body",
"required": true,
"in": "body"
}
],
"responses": {}
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
API Server and Base Path - Swagger
All API endpoints are relative to the base URL. For example, assuming the base URL of https://api.example.com/v1 , the /users endpoint refers to...
Read more >API Servers - OpenAPI Documentation - GitHub Pages
The Server Object provides the base URLs where the API is being served. It can be found in the servers array present in...
Read more >URL.pathname - Web APIs - MDN Web Docs
The pathname property of the URL interface represents a location in a hierarchical structure. It is a string constructed from a list of...
Read more >Website endpoints - Amazon Simple Storage Service
To request a specific object that is stored at the root level in the bucket, use the following URL structure. http:// bucket-name .s3-website....
Read more >How to get full server URL from any endpoint handler in Gin
c.Request.Host+c.Request.URL.Path should work but the scheme has to be determined. package main import ( "fmt" "github.com/gin-gonic/gin" ) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think your best bet is to describe the
requestBody
asoneOf
an array of schemas, as presumably the server disambiguates the operation required based on the content of the body, or somequery
orheader
parameter?Alternatively, you could use differing
content-types
for therequestBody
.There is also this proposal which is marked for possible future consideration.
If you check this issue on the swagger-ui repository - you can see that this functionality is still in the backlog of work to be done:
If you need further information, you should raise an issue on the repository for the tooling concerned, not the specification itself.