Skip to content

Throw error if required property is not present #331

Closed
@tshelburne

Description

@tshelburne

We had a response typecheck that should not have because we made a typo in the properties list, as below:

required: [organization]
type: object
properties:
  account: { $ref: '#/components/schemas/IOrganization' }

We were expecting the response typechecking to fail if organization wasn't present, but instead it was only looking for an optional account value. It would be nice to have this throw an error on build - something like "Required property "organization" is not defined in the "properties" at [path.to.this.schema]".

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions