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

Objects with properties of type object that uses readonly are required #826

Open
torleifhalseth opened this issue Apr 17, 2023 · 0 comments

Comments

@torleifhalseth
Copy link

torleifhalseth commented Apr 17, 2023

What are the steps to reproduce this issue?

  1. Create a schema with an object type that has a property that is an object or array of objects that has read-only properties.
    Example:
 PatchedEnrollment:
      type: object
      properties:
        created:
          type: string
          format: date-time
          readOnly: true
        enrolled_user:
          $ref: "#/components/schemas/EnrollmentUser"

What happens?

The NonReadonly is added to the PatchedEnrollment type in the generated hooks, but the read-only properties defined on EnrollmentUser are still required.

What were you expecting to happen?

I was expecting/hoping all the read-only properties would be ignored.

Any other comments?

Love this package ❤️

What versions are you using?

Package Version:
6.14.3 (latest and greatest)

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

No branches or pull requests

1 participant