fern-api / fern

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

[Bug] Example of list not being displayed #3003

Open nlassaux opened 8 months ago

nlassaux commented 8 months ago

Describe the bug

We are using a list as example, which is a valid JSON. But the documentation doesn't show that example.

To reproduce

Steps to reproduce the behavior:

  1. Generate an openapi spec with the following item (I believe the fact that it's a list is the issue. Other fields work well.
"street_address_alias": {
    "items": {
        "type": "string"
    },
    "type": "array",
    "description": "Other known street addresses for the property. When searching for a property\nby address, these aliases will also be matched.",
    "example": [
        "123 Main St",
        "125, Main Street"
    ]
},
  1. Generate the doc
  2. The example holds the key's name instead of the example.

Expected behavior

I'd expect to see ["123 Main St", "125, Main Street"] in place of street_address_alias in there.

Screenshots

On the left, the description was pulled. But on the right, the example wasn't.

Screenshot 2024-02-17 at 01 47 46

Version

Fern Version: 0.18.0

Additional context

Add any other context about the problem here.

armandobelardo commented 6 months ago

@nlassaux would you be able to run fern upgrade and regenerate your docs? This should be fixed!

nlassaux commented 6 months ago
Screenshot 2024-04-18 at 21 19 02

@armandobelardo I think I'm still seeing the issue. I'm now on 0.21.0:

Upgrading from 0.19.31 → 0.21.0

I tried to hard refresh too. Could it be on a RC version, like 0.22.0?

nlassaux commented 6 months ago

@armandobelardo Just tried 0.23.0, I still see the same issue