Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow adding member docs to $ref #2402

Merged
merged 2 commits into from
Oct 3, 2024

Commits on Sep 23, 2024

  1. Allow adding member docs to $ref

    Fixes smithy-lang#2400.
    
    When a member targets a structure, it becomes a schema reference when
    converted to JSON Schema. Previously, we didn't add member docs to the
    converted object, possibly because earlier versions of open api or JSON
    Schema did not support it. Reading through [this issue](OAI/OpenAPI-Specification#1514)
    the [OAI spec](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#reference-object),
    and the [JSON Schema Spec](https://json-schema.org/draft/2020-12/json-schema-core#section-8.2.3),
    it seems that OpenAPI 3.1 and JSON Schema 2020-12 support the
    `description` property alongside `$ref`. I wasn't able to find anything
    about whether it is supported in [JSON Schema 07](https://json-schema.org/draft-07/json-schema-release-notes).
    This commit adds a new config option, `addReferenceDescriptions` that
    will add the `description` property alongside `$ref` when the member has
    documentation. I made it opt-in through the config option so we don't
    cause any existing documentation to be changed unexpectedly.
    milesziemer committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    c1ff12b View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2024

  1. Add docs

    milesziemer committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    69ca6a0 View commit details
    Browse the repository at this point in the history