fern-api / fern

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

feat(cli): Add `inline` property to type references from properties in Fern definition with OpenAPI importer #5248

Open Swimburger opened 9 hours ago

Swimburger commented 9 hours ago

Description

In the Fern definition, you can express your desire to inline a type from a property on a type:

types:
  RootType:
    properties:
      bar:
        type: InlineType
        inline: true
  InlineType:
    properties:
      ...

The IR generated from this Fern definition will store the desire to inline a type on the property and on the type declaration. For the type declaration, inline will only be true if all properties reference the type express desire to inline a type.

Changes Made

Testing

Added more test definitions + evaluate existing test definition snapshots.

github-actions[bot] commented 9 hours ago

🌿 Preview your docs: https://fern-preview-3c6c723f-7edd-43bb-a436-ae19b845558b.docs.buildwithfern.com/learn