Skip to content

Fix validation for readOnly $ref properties #999

Open

Description

The "readOnly" keyword of $ref properties is ignored by oav validation process.

Full context:
My team and I are developing a new RP via RPaaS and we have RPaaS validation enabled. We expect read-only properties that are sent as part of the request to be discarded. Instead, if they are defined with the $ref keyword (see example below), they go through and override the existing values of these properties in RPaaS database.
I might be wrong, but I heard that RPaaS are using oav tools to perform their validation task (including the removal of read-only fields from the request body). Is this true? If it is, can this be fixed? Thanks in advance.

Example of a property defined with the $ref keyword:

"systemData": {
          "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/systemData",
          "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information",
          "readOnly": true // This is ignored by oav
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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