-
Notifications
You must be signed in to change notification settings - Fork 41
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
Support for external HTTP references needing authentication #271
Comments
Hi @camball ! We've recently added some support for authentication for external references, the details in the README file in "Configure authentication for external references in OpenAPI files" section. Do you know the necessary authentication details required to retrieve files from "https://github.mycompany.com/" ? |
Thanks—that worked great! I followed these GitHub authentication instructions for my use-case. Didn't realise that settings pane existed, lol. Now that I have that working, I now get another error which I believe is unrelated, // does not work
parameters:
- $ref: 'https://github.mycompany.com/api/v3/repos/.../parameters.yaml#/MyParameter' where it uses JSON Pointer notation to reference just the key // works
parameters:
- $ref: 'https://github.mycompany.com/api/v3/repos/.../parameters.yaml' This I think may be an issue with the extension, but am not sure. I know the extension supports JSON Pointers, but am wondering if there is an issue with it being as part of an external URL. I also validated that |
Could you provide a snippet from, or a whole |
Sure, here's the full content of Authorization:
name: Authorization
in: header
required: true
description: My Authorization description
schema:
type: string
example: an example here
an-id:
name: an-id
in: header
description: My ID description
required: true
schema:
type: string and the links look like https://github.mycompany.com/api/v3/repos/.../parameters.yaml#/Authorization
https://github.mycompany.com/api/v3/repos/.../parameters.yaml#/an-id |
Thanks for the info. I would expect this to work, but let me setup something similar here to make sure we don't have an bug or regression. |
It should be working, tested using simple OpenAPI file + your There could be some issues handling nested references (i.e. referencing a file that in turn has refs), but the one below should be ok.
|
I'm not expert on proxies, but I'm having trouble getting validation to work when pulling in externally-defined HTTP references. I get an error like:
I added
github.mycompany.com
to myopenapi.approvedHostnames
:and the 401 is where I'm stuck with. I'm wondering if it's a proxy issue, or otherwise, and if there's a solution at all here. Thanks!
The text was updated successfully, but these errors were encountered: