This schema passes validation with v0.135.0 but fails to validate with versions v0.136.0..v0.149.0 (latest at time of writing).
openapi: 3.0.0
info:
version: 0.0.0
title: $ref with siblings example
paths: {}
components:
schemas:
Schema1:
type: object
properties:
p:
description: Some text
$ref: '#/components/schemas/Schema2'
Schema2:
type: string
The error message is Validation error: invalid components: schema "Schema1": extra sibling fields: [description]
The relevant section of the OpenAPI 3.0.0 specification states that
any properties added SHALL be ignored
so I believe the description here is allowed by the spec and should not cause a validation failure.
--
The schemas I'm working with have a lot of description and example fields for referenced schemas, which is useful documentation for humans even if it is ignored by programs.
This schema passes validation with v0.135.0 but fails to validate with versions v0.136.0..v0.149.0 (latest at time of writing).
The error message is
Validation error: invalid components: schema "Schema1": extra sibling fields: [description]The relevant section of the OpenAPI 3.0.0 specification states that
so I believe the
descriptionhere is allowed by the spec and should not cause a validation failure.--
The schemas I'm working with have a lot of
descriptionandexamplefields for referenced schemas, which is useful documentation for humans even if it is ignored by programs.