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

Bug: Only showing one server's headers #840

Open
zippocage opened this issue Jun 16, 2023 · 3 comments
Open

Bug: Only showing one server's headers #840

zippocage opened this issue Jun 16, 2023 · 3 comments

Comments

@zippocage
Copy link

In our spectaql config.yml file, we have two servers (test and staging) that differ by URL. They also require different Authorization bearer token.

Issue

Only headers for the first server is shown in the generated documentation (while both server URLs are listed). Is this intended or is this a bug?

Details

If I have the following in the server section of the config.yml:

servers:

  - url: https://staging.example.org/api/
    description: Staging
    headers:
      - name: Authorization
        example: Bearer <STAGING_TOKEN>
        comment: This token must be provided to access the staging backend and API

  - url: https://test.example.org/api/
    description: Test
    headers:
      - name: Authorization
        example: Bearer <TEST_TOKEN>
        comment: This token must be provided to access the test backend and API

Then the generated documentation will render it like this:
Screenshot 2023-06-16 at 14 31 00

@zippocage zippocage changed the title Headers that differ per server? Bug? Headers that differ per server Jul 3, 2023
@zippocage
Copy link
Author

zippocage commented Jan 18, 2024

Any updates? @newhouse ?

@zippocage zippocage changed the title Bug? Headers that differ per server Bug: Only showing one server's headers Jan 18, 2024
@newhouse
Copy link
Collaborator

This is likely just some legacy carryover from when this project was forked from DociQL.

The obvious change would be to have 2 outputs in the HEADERS area (like there is in the API ENDPOINTS area). But perhaps it would be better to combine those 2 areas and output the Endpoints and Headers together?

@zippocage any suggestions on how you'd expect the output?

@zippocage
Copy link
Author

@newhouse I think it makes sense to group each endpoint with its set of headers.

For those deployments where headers are the same independent of endpoint, they may find it a bit repetitive but given the way headers are colocated in the spectaql config file, there is not much to do about that.

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