openai-openapi icon indicating copy to clipboard operation
openai-openapi copied to clipboard

Missing the security scheme definition & optional organization header

Open justinyoo opened this issue 2 years ago • 4 comments

Related to: #25

According to the Authorization section of the API document, to make an API call it requires one mandatory Authorization header and an optional OpenAI-Organization header.

After this PR, the OpenAPI document has:

  1. The mandatory Authorization header.
  2. The optional OpenAI-Organization header on each endpoint/operation.

justinyoo avatar Mar 10 '23 06:03 justinyoo

Related to #10 and #12 but this PR has broader coverage.

justinyoo avatar Mar 10 '23 07:03 justinyoo

Hi @justinyoo this is great I think.

What do you think about storing the parameter definition in components.parameters in order to avoid duplication?

https://swagger.io/docs/specification/components/

thejamescollins avatar Mar 10 '23 23:03 thejamescollins

Hi @justinyoo this is great I think.

What do you think about storing the parameter definition in components.parameters in order to avoid duplication?

https://swagger.io/docs/specification/components/

@om4james Good idea! I refactored all the existing parameters as well to keep the document structure consistent.

justinyoo avatar Mar 11 '23 04:03 justinyoo

Hey Justin, thanks for flagging, I am working on a PR to add the API key and optional org header! Will update you here when it is done.

logankilpatrick avatar Sep 01 '23 16:09 logankilpatrick