Skip to content

[oas2tson] Ref handling #210

@simoneb

Description

@simoneb

From @toomuchdesign:

In my own project I've finished implementing three resolution strategies for refs: import, inline, and keep. Currently, oas2tson implements inline.

  • Import is interesting because it allows importing only the necessary subtrees.
  • Keep doesn't resolve the refs (leaves them as they are), but it's potentially useful for registering schemas individually in Fastify and exposing an OpenAPI definition with the individual components defined (and not inline). There are some limitations in Fastify/Swagger that prevent achieving this currently, but I believe we'll get there in the future. Additionally, json-schema-to-ts is potentially able to resolve the types of schemas linked via ref.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions