Open DrSatyr opened 3 weeks ago
This is not correct. For OAS 3.1:
examples:
Micheál Higgins Senior Solutions Architect SmartBear Software
Sent from my iPad
On 1 Jun 2024, at 15:56, Aliaksandr Pinchuk @.***> wrote:
'example' and "examples" fields in OpenAPI objects (eg Parameter, Schema, MediaType, Header) are not compared.
Old schema:
schema: type: string, example: old example
New schema:
schema: type: string, example: new example
Such fields are not valuable for API functionality, but they are important from an API documentation perspective. Descriptions are already handled, so my suggestion is to handle examples as well.
— Reply to this email directly, view it on GitHubhttps://github.com/OpenAPITools/openapi-diff/issues/666, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANMNL5TOC55HDFNWKYE6EBTZFHOJZAVCNFSM6AAAAABIUG6IW2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGMZDSMJYGU3TEOA. You are receiving this because you are subscribed to this thread.Message ID: @.***>
We hope you found this email of interest; however, click here if you wish to unsubscribehttp://www2.smartbear.com/SubscriptionCenter.html?utm_source=outlook&utm_medium=email&utm_content=emailsig or manage your email preferences. Privacy Policy.https://smartbear.com/privacy/
Disclaimer
The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.
@mhiggins-SA Sorry, it's my bad, the provided schemas did not explain all the cases. For sure OAS 3.1 introduces "examples" in favor of deprecated "example". But openapi-diff works with all versions of specifications (Swagger 2.0, OAS 3.0, OAS 3.1).
Basically, I would say that openapi-diff does not handle "examples" and "example" in all versions of the specification. Currently, I am working on PR to solve this, so will cover all versions.
'example' and "examples" fields in OpenAPI objects (eg Parameter, Schema, MediaType, Header) are not compared.
Old schema:
New schema:
Such fields are not valuable for API functionality, but they are important from an API documentation perspective. Descriptions are already handled, so my suggestion is to handle examples as well.