Nested Server decorators in a service #6696
Unanswered
Devon-White
asked this question in
OpenAPI3
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Was wondering if there is anyway i can specify a specific server url for a specific endpoint, where the default server URL is already assigned to the namespace/service.
Consider the following. We have a service which looks like:
You can see we are importing all the declared endpoints for this service. The endpoint we are focusing on is the
embeds-tokens
, which looks like:Notice how in this endpoint we set the server so it has no variables and the
space_name
variable from the top level service has replaced with a staticembeds
in the url. This is intentional as the api is not bounded to a persons account in this case, but still is part of the service pathway which is/api/farbic/endpoint
.In a openapi spec, I can solve this by declaring another
servers
property directly inside the endpoint schema.Which would look like:
However, even with the
server
decorator on the endpoint (which shows as valid) the spec will generate like such:Is there anyway to accomplish what I'm looking to accomplish, while still keeping the endpoint inside the same namespace/ service?
Example Playground
Beta Was this translation helpful? Give feedback.
All reactions