-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
To validate the changes made in #63052 I put the OpenAPI schema into editor.swagger.io to see if the schema for JSON Patch had any validation errors (it does not).
However, amongst a few schema errors that are found in the document that aren't just artifacts of testing, I found two that appear to be actual issues:
Semantic error at components.schemas.Category.properties.tags.$ref - $refs must reference a valid ___location in the document
fromLine 1362 in f91de94
"$ref": "#/components/schemas/Category/properties/parent/properties/tags" Semantic error at components.schemas.Item.properties.name.$ref - $refs must reference a valid ___location in the document
fromLine 1427 in f91de94
"$ref": "#/components/schemas/Root/properties/item1/properties/name"
These correlate to these parts of the code:
public IEnumerable<Tag> Tags { get; set; } = []; public string[] Name { get; set; } = null!;
Both of these properties are arrays and appear to generate a circular reference to themselves via another object.
- Points to the
tags
property of theparent
property of itself, but that's also aCategory
, so it's just a circular reference to itself. - Points to the
name
property of theitem1
property ofRoot
, but that's also anItem
, so again creates a circular reference to itself.
In both cases it looks like the schema properties should be an array of items which reference Tag
or Item
respectively.
Expected Behavior
The schemas do not generate validation errors.
Steps To Reproduce
Enter the contents of OpenApiDocumentLocalizationTests.VerifyOpenApiDocumentIsInvariant.verified.txt into editor.swagger.io.
Exceptions (if any)
No response
.NET Version
10.0.100-preview.7.25322.101
Anything else?
No response