You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on building some validation for an Open Service Broker, where the broker API schema is defined using OpenAPI v3.0.0.
It allows for JSON schema to be referenced in the broker api spec itself.
Here is an example:
"schemas": {
"service_instance": {
"create": {
"parameters": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"billing-account": {
"description": "Billing account number used to charge use of shared fake server.",
"type": "string"
}
}
}
},
When running the validation, in OpenAPIParser::SchemaValidator#validate_schema,
I see the following error:
NoMethodError:
undefined method `any_of' for #
Looking further, the remote reference is properly resolved and the schema draft is fetched as defined in the openapi spec, unfortunately validate_schema doesn't know how to use the schema object to validate the value, especially because the schema is JSON schema.
In validate_schema(schema, value) the passed schema parameter is of type OpenAPIParser::Schemas::OpenAPI and contains the JSON schema draft and value parameter contains the schema definition itself, e.g. schema['service_instaces']['create']['parameters']
Hello,
I'm working on building some validation for an Open Service Broker, where the broker API schema is defined using OpenAPI v3.0.0.
It allows for JSON schema to be referenced in the broker api spec itself.
Here is an example:
When running the validation, in
OpenAPIParser::SchemaValidator#validate_schema
,I see the following error:
Looking further, the remote reference is properly resolved and the schema draft is fetched as defined in the openapi spec, unfortunately
validate_schema
doesn't know how to use theschema
object to validate thevalue
, especially because the schema is JSON schema.In
validate_schema(schema, value)
the passedschema
parameter is of typeOpenAPIParser::Schemas::OpenAPI
and contains the JSON schema draft andvalue
parameter contains the schema definition itself, e.g.schema['service_instaces']['create']['parameters']
I'm using https://github.com/interagent/committee in our specs and looking for suggestions on how to handle this case? Thanks
The text was updated successfully, but these errors were encountered: