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