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

Initial support for readOnly & writeOnly keywords #40

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

skryukov
Copy link
Owner

@skryukov skryukov commented Jan 14, 2025

This PR adds support for readOnly & writeOnly keywords in context of properties, required and additionalProperties keywords.

This allows using schemas like this in both request and response bodies:

components:
  schemas:
    Id:
      type: integer
      format: int64
      readOnly: true

    User:
      type: object
      required: [id, name, password]
      additionalProperties: false
      properties:
        id:
          $ref: "#/components/schemas/Id"
        name:
          type: string
        password:
          type: string
          writeOnly: true

Closes #35

@skryukov skryukov force-pushed the read-only-and-write-only-support branch from 68d90a0 to 9b1d1e0 Compare January 14, 2025 11:27
@skryukov skryukov merged commit 0de63d0 into main Jan 14, 2025
7 checks passed
@skryukov skryukov deleted the read-only-and-write-only-support branch January 14, 2025 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Are readOnly and writeOnly properties supported?
1 participant