Skip to content

Supporting all header fields inside components/headers - #366

Merged
PerthCharern merged 5 commits into
microsoft:masterfrom
VitaliyKurokhtin:vvk/component-headers
Dec 28, 2018
Merged

PerthCharern merged 5 commits into
microsoft:masterfrom
VitaliyKurokhtin:vvk/component-headers

Conversation

@VitaliyKurokhtin

Copy link
Copy Markdown
Contributor

Specification says HeaderObject is a ParameterObject with some minor differences: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#headerObject

components/headers at the same time is defined as Map[string, Header Object | Reference Object]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#componentsObject

which leads me to believe that components/headers should support full set of properties allowed for ParameterObject with exception of "name" and "in"

@PerthCharern

Copy link
Copy Markdown
Contributor

Thank you for your contribution Vitaliy Kurokhtin (@VitaliyKurokhtin) 😄

I agree with your reading of the spec. Our Header deserializer should recognize all the properties in the parameter object except name and in.

Could you help fix the test a bit? - and I'll help check this in.

@PerthCharern PerthCharern left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See feedback above.

@VitaliyKurokhtin

Copy link
Copy Markdown
Contributor Author

Test improved.

@PerthCharern
PerthCharern merged commit 7a77498 into microsoft:master Dec 28, 2018
@PerthCharern

Copy link
Copy Markdown
Contributor

Thanks for writing this Vitaliy Kurokhtin (@VitaliyKurokhtin)!

@VitaliyKurokhtin
Vitaliy Kurokhtin (VitaliyKurokhtin) deleted the vvk/component-headers branch December 28, 2018 22:09
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

Successfully merging this pull request may close these issues.

3 participants