Skip to content

readOnly not working as expected #147

@crizo23

Description

@crizo23

When adding readonly: true to a schema, an error is thrown by oas3-chow-chow:

'TypeError: Cannot read properties of undefined (reading 'schemaContext')\n    
at Ajv.validate (<path>/node_modules/oas3-chow-chow/src/compiler/CompiledSchema.ts:22:8)\n    
at CompiledSchema.validate [as validator] (eval at localCompile (<path>/node_modules/ajv/lib/compile/index.js:120:26), <anonymous>:3:1785)\n    
at CompiledSchema.validate (<path>/node_modules/oas3-c…edPath.validateRequest (<path>/node_modules/oas3-chow-chow/src/compiler/CompiledPath.ts:49:34)\n   

I believe it's somewhere in this code, but I'm not sure what the code is doing.
I see the code comment "Remove unsupported additional OpenAPI keywords." and what looks to be a redefining of the validation function?

thanks

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