fern-api / fern

Input OpenAPI. Output SDKs and Docs.
https://buildwithfern.com
Apache License 2.0
2.69k stars 151 forks source link

[Bug][OpenAPI] Deprecated properties display in response examples #5246

Open nateKlaux opened 10 hours ago

nateKlaux commented 10 hours ago

Describe the Bug

OAS 3.1.x supports a deprecated tag, which Fern correctly applies to the schema. However, in Response Examples, deprecated properties still appear even when they are not defined in the OAS definition.

This results in inaccurate examples that may mislead customers.

Information to Reproduce

CLI Version

"version": "0.45.0-rc52"

Actual Behavior

bug

Expected Behavior

For properties where deprecated: true not to render in response examples.

expected

API Definition (if relevant)

In Example 1 below:

              examples:
                example1:
                  summary: Example 1
                  value:
                    - asset: ETH
                      address: "0xC8a65Fadf0e0dDAf421F28FEAb69Bf6E2E589963"
                      cluster:
                        name: "PolyNetwork Hack 2021-08-10"
                        categoryId: 6
                      rating: "lowRisk"
                      customAddress: null
                      chainalysisIdentification:
                        addressName: "STOLEN FUNDS: PolyNetwork Hack 2021-08-10"
                        description: ""
                        categoryId: 6