Skip to content
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

Overriding global server not working #656

Closed
ayurst opened this issue Sep 26, 2018 · 2 comments
Closed

Overriding global server not working #656

ayurst opened this issue Sep 26, 2018 · 2 comments

Comments

@ayurst
Copy link

ayurst commented Sep 26, 2018

I thought I had seen this as a previous issue which was patched. However, I am using the latest version of Redoc. All I am simply trying to do is override a global server url.

servers:
  - url: 'https://myurl.com'
paths:
  /search:
    post:
      description: Search catalog items
      requestBody:
        content:
          application/json:
            schema: {$ref: '#/components/schemas/SearchOptions'}
        description: The search parameters
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {$ref: '#/components/schemas/SearchResponse'}
          description: OK
      summary: Search catalog items
      tags: [Search]
    servers:
    - url: 'https://searchurl.com'

Instead it still shows the global server within my Redoc API specification. I have tried my yml contents within the Swagger IO Editor and it appears how it should with the local server url's.

@RomanHotsiy
Copy link
Member

Yes, it was patched for Operation object but not for Path Item object.
Fixed it now. Will land in the upcoming release.

@ayurst
Copy link
Author

ayurst commented Sep 28, 2018

@RomanGotsiy ok that makes sense. Great thank you for the quick reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants