Skip to content

Validation doesn't account for ingress/egress direction and doesn't respect writeOnly/readOnly in conjunction with required #229

@tstirrat15

Description

@tstirrat15

I'd like to use this library to validate requests and responses that have readOnly and writeOnly flags in addition to required flags. Currently, the code is aware of and respects the required flag, but it isn't aware of readOnly or writeOnly.

This is correct as it stands; the spec uses a MAY around the handling of readOnly and writeOnly. I think this package would be more useful and powerful if it respected them.

I'm planning on putting up a PR that:

  • Collects readOnly and writeOnly flags as a part of interpretation
  • Adds a notion of direction (ingress vs egress) to validation
  • Uses those flags in validation of required by omitting readOnly fields from ingress validation and writeOnly fields from egress validation

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