-
Hi all, I work at a company that requires Swagger/OpenAPI specs for every API, so we have about 1500+ specs right now; probably 85% are using Swagger 2. I'm going to start requiring everyone to use OpenAPI 3.x going forward, primarily because it's waaay past time we did this. I'm also trying to make it easier for specs to be downloaded and imported into Insomnia or Postman and not have duplicate params that will cause confusion. I've got a couple of issues, however, that are holding me up.
Sorry for the long note. I'm just hung up on #1, and worried about #2 (especially since we've made a big deal about "keys are for tracking, not security" and now they are in the security section). I'm curious if others have had to deal with this and what has worked for them. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
|
Beta Was this translation helpful? Give feedback.
-
Thanks, @webron. So, if an older spec has content-type/accept as a required header param, other than changing their code is there anything we can do in the spec to indicate it is required? |
Beta Was this translation helpful? Give feedback.
-
Hi @webron. Circling back on this after a few months...is there a good explanation for why authorization is strictly prohibited as a header param? I'm re-writing docs and I know I'll end up getting this question. |
Beta Was this translation helpful? Give feedback.
-
Looks like this discussion resolved back in 2022, closing. |
Beta Was this translation helpful? Give feedback.
That was indeed one of the stricter changes from 2.0 to 3.0. You simply cannot have those as defined headers anymore as those are exclusively defined under
content
now. If you're using any conversion tools, they may be able to support it (or extended to support it). Adding those headers in 3+ is a no-go and should fail validation.key
orx-api-key
could have been defined in 2.0 as well under the security sections. I don't believe there's any requirement for you to move them to become security definitions rather than parameters in 3.0. The benefit of moving them to the security section is that that you're not going to have to add them to each and every operation.authorization
is stric…