From d23bf5e4ca290ddffbf3c052768d098fa2fb9ca1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 3 Aug 2025 01:06:41 +0000 Subject: [PATCH 1/3] Initial plan From f4733482cfda7e74df4fc5a81cd6ee703a0f296c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 3 Aug 2025 01:13:50 +0000 Subject: [PATCH 2/3] Initial plan for quarantining OpenApiDocumentLocalizationTests.VerifyOpenApiDocumentIsInvariant Co-authored-by: captainsafia <1857993+captainsafia@users.noreply.github.com> --- ...ifyOpenApiDocumentIsInvariant.received.txt | 1915 +++++++++++++++++ 1 file changed, 1915 insertions(+) create mode 100644 src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApiDocumentLocalizationTests.VerifyOpenApiDocumentIsInvariant.received.txt diff --git a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApiDocumentLocalizationTests.VerifyOpenApiDocumentIsInvariant.received.txt b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApiDocumentLocalizationTests.VerifyOpenApiDocumentIsInvariant.received.txt new file mode 100644 index 000000000000..3b8db723fdee --- /dev/null +++ b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApiDocumentLocalizationTests.VerifyOpenApiDocumentIsInvariant.received.txt @@ -0,0 +1,1915 @@ +{ + "openapi": "3.1.1", + "info": { + "title": "Sample | localized", + "description": "This is a localized OpenAPI document for français (France).", + "version": "1.0.0" + }, + "servers": [ + { + "url": "http://localhost/" + } + ], + "paths": { + "/forms/form-file": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "required": [ + "resume" + ], + "type": "object", + "properties": { + "resume": { + "$ref": "#/components/schemas/IFormFile" + } + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/forms/form-files": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "required": [ + "files" + ], + "type": "object", + "properties": { + "files": { + "$ref": "#/components/schemas/IFormFileCollection" + } + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/forms/form-file-multiple": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "required": [ + "resume", + "files" + ], + "type": "object", + "allOf": [ + { + "type": "object", + "properties": { + "resume": { + "$ref": "#/components/schemas/IFormFile" + } + } + }, + { + "type": "object", + "properties": { + "files": { + "$ref": "#/components/schemas/IFormFileCollection" + } + } + } + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/forms/form-todo": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Todo" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/Todo" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/forms/forms-pocos-and-files": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "required": [ + "file" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/Todo" + }, + { + "type": "object", + "properties": { + "file": { + "$ref": "#/components/schemas/IFormFile" + } + } + } + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/v1/array-of-guids": { + "get": { + "tags": [ + "Sample" + ], + "parameters": [ + { + "name": "guids", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + } + } + } + } + }, + "/v1/todos": { + "post": { + "tags": [ + "Sample" + ], + "summary": "Creates a new todo item.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Todo" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/v1/todos/{id}": { + "get": { + "tags": [ + "Sample" + ], + "description": "Returns a specific todo item.", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TodoWithDueDate" + } + } + } + } + } + } + }, + "/v2/users": { + "get": { + "tags": [ + "users" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "post": { + "tags": [ + "Sample" + ], + "operationId": "CreateUser", + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/xml/type-with-examples": { + "get": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TypeWithExamples" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TypeWithExamples" + } + } + } + } + } + } + }, + "/xml/todo": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TodoFomInterface" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/xml/project": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Project" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/xml/board": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BoardItem" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/xml/project-record": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProjectRecord" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/xml/todo-with-description": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TodoWithDescription" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/Xml": { + "get": { + "tags": [ + "Xml" + ], + "parameters": [ + { + "name": "name", + "in": "query", + "description": "The name of the person.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns the greeting.", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "type": "string" + } + }, + "text/json": { + "schema": { + "type": "string" + } + } + } + } + } + }, + "post": { + "tags": [ + "Xml" + ], + "requestBody": { + "description": "The todo to insert into the database.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Todo" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Todo" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Todo" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "type": "string" + } + }, + "text/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/schemas-by-ref/typed-results": { + "get": { + "tags": [ + "Sample" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Triangle" + } + } + } + } + } + } + }, + "/schemas-by-ref/multiple-results": { + "get": { + "tags": [ + "Sample" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Triangle" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/schemas-by-ref/iresult-no-produces": { + "get": { + "tags": [ + "Sample" + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/iresult-with-produces": { + "get": { + "tags": [ + "Sample" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/xml": { + "schema": { + "$ref": "#/components/schemas/Triangle" + } + } + } + } + } + } + }, + "/schemas-by-ref/primitives": { + "get": { + "tags": [ + "Sample" + ], + "parameters": [ + { + "name": "id", + "in": "query", + "description": "The ID associated with the Todo item.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "size", + "in": "query", + "description": "The number of Todos to fetch", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/product": { + "get": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Product" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Product" + } + } + } + } + } + } + }, + "/schemas-by-ref/account": { + "get": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Account" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Account" + } + } + } + } + } + } + }, + "/schemas-by-ref/array-of-ints": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int32" + } + } + } + } + } + } + }, + "/schemas-by-ref/list-of-ints": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int32" + } + } + } + } + } + } + }, + "/schemas-by-ref/ienumerable-of-ints": { + "post": { + "tags": [ + "Sample" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int32" + } + } + } + } + } + } + }, + "/schemas-by-ref/dictionary-of-ints": { + "get": { + "tags": [ + "Sample" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int32" + } + } + } + } + } + } + } + }, + "/schemas-by-ref/frozen-dictionary-of-ints": { + "get": { + "tags": [ + "Sample" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int32" + } + } + } + } + } + } + } + }, + "/schemas-by-ref/shape": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Shape" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/weatherforecastbase": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WeatherForecastBase" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/person": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Person" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/category": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Category" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/container": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ContainerType" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/root": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Root" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/location": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LocationContainer" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/parent": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ParentObject" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/child": { + "post": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChildObject" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/schemas-by-ref/json-patch": { + "patch": { + "tags": [ + "Sample" + ], + "requestBody": { + "content": { + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/JsonPatchDocumentOfParentObject" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/responses/200-add-xml": { + "get": { + "tags": [ + "Sample" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Todo" + } + }, + "text/xml": { + "schema": { + "$ref": "#/components/schemas/Todo" + } + } + } + } + } + } + }, + "/responses/200-only-xml": { + "get": { + "tags": [ + "Sample" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/xml": { + "schema": { + "$ref": "#/components/schemas/Todo" + } + } + } + } + } + } + }, + "/responses/triangle": { + "get": { + "tags": [ + "Sample" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Triangle" + } + } + } + } + } + } + }, + "/responses/shape": { + "get": { + "tags": [ + "Sample" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Shape" + } + } + } + } + } + } + }, + "/getbyidandname/{id}/{name}": { + "get": { + "tags": [ + "Test" + ], + "parameters": [ + { + "name": "Id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "Name", + "in": "path", + "required": true, + "schema": { + "minLength": 5, + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "type": "string" + } + }, + "text/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/gettypedresult": { + "get": { + "tags": [ + "Test" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MvcTodo" + } + } + } + } + } + } + }, + "/forms": { + "post": { + "tags": [ + "Test" + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "properties": { + "Title": { + "type": "string" + }, + "Description": { + "type": "string" + }, + "IsCompleted": { + "type": "boolean" + } + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/getcultureinvariant": { + "get": { + "tags": [ + "Test" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CurrentWeather" + } + } + } + } + } + } + }, + "/query": { + "query": { + "tags": [ + "Test" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/CurrentWeather" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/CurrentWeather" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/CurrentWeather" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Account": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + } + } + }, + "AddressDto": { + "required": [ + "relatedLocation" + ], + "type": "object", + "properties": { + "relatedLocation": { + "$ref": "#/components/schemas/LocationDto" + } + } + }, + "BoardItem": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "description": "An item on the board." + }, + "Category": { + "required": [ + "name", + "parent" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "parent": { + "$ref": "#/components/schemas/Category" + }, + "tags": { + "$ref": "#/components/schemas/Category/properties/parent/properties/tags" + } + } + }, + "ChildObject": { + "required": [ + "parent" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "parent": { + "$ref": "#/components/schemas/ParentObject" + } + } + }, + "ContainerType": { + "type": "object", + "properties": { + "seq1": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "seq2": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContainerType/properties/seq1/items" + } + } + } + }, + "CurrentWeather": { + "type": "object", + "properties": { + "temperature": { + "maximum": 100.5, + "minimum": -100.5, + "type": "number", + "format": "float", + "default": 0.1 + } + } + }, + "IFormFile": { + "type": "string", + "format": "binary" + }, + "IFormFileCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IFormFile" + } + }, + "Item": { + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/Root/properties/item1/properties/name" + }, + "value": { + "type": "integer", + "format": "int32" + } + } + }, + "JsonPatchDocumentOfParentObject": { }, + "LocationContainer": { + "required": [ + "location" + ], + "type": "object", + "properties": { + "location": { + "$ref": "#/components/schemas/LocationDto" + } + } + }, + "LocationDto": { + "required": [ + "address" + ], + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/AddressDto" + } + } + }, + "MvcTodo": { + "required": [ + "title", + "description", + "isCompleted" + ], + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "isCompleted": { + "type": "boolean" + } + } + }, + "ParentObject": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChildObject" + } + } + } + }, + "Person": { + "required": [ + "discriminator" + ], + "type": "object", + "anyOf": [ + { + "$ref": "#/components/schemas/PersonStudent" + }, + { + "$ref": "#/components/schemas/PersonTeacher" + } + ], + "discriminator": { + "propertyName": "discriminator", + "mapping": { + "student": "#/components/schemas/PersonStudent", + "teacher": "#/components/schemas/PersonTeacher" + } + } + }, + "PersonStudent": { + "properties": { + "discriminator": { + "enum": [ + "student" + ], + "type": "string" + }, + "gpa": { + "type": "number", + "format": "double" + } + } + }, + "PersonTeacher": { + "required": [ + "subject" + ], + "properties": { + "discriminator": { + "enum": [ + "teacher" + ], + "type": "string" + }, + "subject": { + "type": "string" + } + } + }, + "Product": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + } + } + }, + "Project": { + "required": [ + "name", + "description" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "description": "The project that contains Todo items." + }, + "ProjectRecord": { + "required": [ + "name", + "description" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the project." + }, + "description": { + "type": "string", + "description": "The description of the project." + } + }, + "description": "The project that contains Todo items." + }, + "Root": { + "type": "object", + "properties": { + "item1": { + "$ref": "#/components/schemas/Item" + }, + "item2": { + "$ref": "#/components/schemas/Item" + } + } + }, + "Shape": { + "required": [ + "$type" + ], + "type": "object", + "anyOf": [ + { + "$ref": "#/components/schemas/ShapeTriangle" + }, + { + "$ref": "#/components/schemas/ShapeSquare" + } + ], + "discriminator": { + "propertyName": "$type", + "mapping": { + "triangle": "#/components/schemas/ShapeTriangle", + "square": "#/components/schemas/ShapeSquare" + } + } + }, + "ShapeSquare": { + "properties": { + "$type": { + "enum": [ + "square" + ], + "type": "string" + }, + "area": { + "type": "number", + "format": "double" + }, + "color": { + "type": "string" + }, + "sides": { + "type": "integer", + "format": "int32" + } + } + }, + "ShapeTriangle": { + "properties": { + "$type": { + "enum": [ + "triangle" + ], + "type": "string" + }, + "hypotenuse": { + "type": "number", + "format": "double" + }, + "color": { + "type": "string" + }, + "sides": { + "type": "integer", + "format": "int32" + } + } + }, + "Tag": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "Todo": { + "required": [ + "id", + "title", + "completed", + "createdAt" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The unique identifier of the to-do item.", + "format": "int32" + }, + "title": { + "type": "string", + "description": "The title of the to-do item." + }, + "completed": { + "type": "boolean", + "description": "Indicates whether the to-do item is completed." + }, + "createdAt": { + "type": "string", + "description": "The date and time when the to-do item was created.", + "format": "date-time" + } + }, + "description": "Represents a to-do item." + }, + "TodoFomInterface": { + "required": [ + "name", + "description" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The identifier of the todo.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "The name of the todo." + }, + "description": { + "type": "string", + "description": "A description of the todo." + } + }, + "description": "This is a todo item." + }, + "TodoWithDescription": { + "required": [ + "name", + "description" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The identifier of the todo, overridden.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "The name of the todo, overridden." + }, + "description": { + "type": "string", + "description": "Another description of the todo." + } + } + }, + "TodoWithDueDate": { + "required": [ + "dueDate", + "id", + "title", + "completed", + "createdAt" + ], + "type": "object", + "properties": { + "dueDate": { + "type": "string", + "description": "The due date of the to-do item.", + "format": "date-time" + }, + "id": { + "type": "integer", + "description": "The unique identifier of the to-do item.", + "format": "int32" + }, + "title": { + "type": "string", + "description": "The title of the to-do item." + }, + "completed": { + "type": "boolean", + "description": "Indicates whether the to-do item is completed." + }, + "createdAt": { + "type": "string", + "description": "The date and time when the to-do item was created.", + "format": "date-time" + } + }, + "description": "Represents a to-do item with a due date." + }, + "Triangle": { + "type": "object", + "properties": { + "hypotenuse": { + "type": "number", + "format": "double" + }, + "color": { + "type": "string" + }, + "sides": { + "type": "integer", + "format": "int32" + } + } + }, + "TypeWithExamples": { + "type": "object", + "properties": { + "booleanType": { + "type": "boolean", + "example": true + }, + "integerType": { + "type": "integer", + "format": "int32", + "example": 42 + }, + "longType": { + "type": "integer", + "format": "int64", + "example": 1234567890123456789 + }, + "doubleType": { + "type": "number", + "format": "double", + "example": 3.14 + }, + "floatType": { + "type": "number", + "format": "float", + "example": 3.14 + }, + "dateTimeType": { + "type": "string", + "format": "date-time", + "example": "2022-01-01T00:00:00Z" + }, + "dateOnlyType": { + "type": "string", + "format": "date", + "example": "2022-01-01" + } + } + }, + "WeatherForecastBase": { + "required": [ + "$type" + ], + "type": "object", + "anyOf": [ + { + "$ref": "#/components/schemas/WeatherForecastBaseWeatherForecastWithCity" + }, + { + "$ref": "#/components/schemas/WeatherForecastBaseWeatherForecastWithTimeSeries" + }, + { + "$ref": "#/components/schemas/WeatherForecastBaseWeatherForecastWithLocalNews" + } + ], + "discriminator": { + "propertyName": "$type", + "mapping": { + "0": "#/components/schemas/WeatherForecastBaseWeatherForecastWithCity", + "1": "#/components/schemas/WeatherForecastBaseWeatherForecastWithTimeSeries", + "2": "#/components/schemas/WeatherForecastBaseWeatherForecastWithLocalNews" + } + } + }, + "WeatherForecastBaseWeatherForecastWithCity": { + "required": [ + "city" + ], + "properties": { + "$type": { + "enum": [ + 0 + ], + "type": "integer" + }, + "city": { + "type": "string" + } + } + }, + "WeatherForecastBaseWeatherForecastWithLocalNews": { + "required": [ + "news" + ], + "properties": { + "$type": { + "enum": [ + 2 + ], + "type": "integer" + }, + "news": { + "type": "string" + } + } + }, + "WeatherForecastBaseWeatherForecastWithTimeSeries": { + "required": [ + "summary" + ], + "properties": { + "$type": { + "enum": [ + 1 + ], + "type": "integer" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "temperatureC": { + "type": "integer", + "format": "int32" + }, + "summary": { + "type": "string" + } + } + } + } + }, + "tags": [ + { + "name": "Sample" + }, + { + "name": "users" + }, + { + "name": "Xml" + }, + { + "name": "Test" + } + ] +} \ No newline at end of file From 559a40c6892fe023e3b6d3e640b06d408ef92f13 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 3 Aug 2025 01:17:00 +0000 Subject: [PATCH 3/3] Quarantine OpenApiDocumentLocalizationTests.VerifyOpenApiDocumentIsInvariant Co-authored-by: captainsafia <1857993+captainsafia@users.noreply.github.com> --- .../OpenApiDocumentLocalizationTests.cs | 1 + ...ifyOpenApiDocumentIsInvariant.received.txt | 1915 ----------------- 2 files changed, 1 insertion(+), 1915 deletions(-) delete mode 100644 src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApiDocumentLocalizationTests.VerifyOpenApiDocumentIsInvariant.received.txt diff --git a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/OpenApiDocumentLocalizationTests.cs b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/OpenApiDocumentLocalizationTests.cs index e2480db6e048..4c6dc820e989 100644 --- a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/OpenApiDocumentLocalizationTests.cs +++ b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/OpenApiDocumentLocalizationTests.cs @@ -7,6 +7,7 @@ public sealed class OpenApiDocumentLocalizationTests(LocalizedSampleAppFixture fixture) : IClassFixture { [Fact] + [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/63073")] public async Task VerifyOpenApiDocumentIsInvariant() { using var client = fixture.CreateClient(); diff --git a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApiDocumentLocalizationTests.VerifyOpenApiDocumentIsInvariant.received.txt b/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApiDocumentLocalizationTests.VerifyOpenApiDocumentIsInvariant.received.txt deleted file mode 100644 index 3b8db723fdee..000000000000 --- a/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApiDocumentLocalizationTests.VerifyOpenApiDocumentIsInvariant.received.txt +++ /dev/null @@ -1,1915 +0,0 @@ -{ - "openapi": "3.1.1", - "info": { - "title": "Sample | localized", - "description": "This is a localized OpenAPI document for français (France).", - "version": "1.0.0" - }, - "servers": [ - { - "url": "http://localhost/" - } - ], - "paths": { - "/forms/form-file": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "required": [ - "resume" - ], - "type": "object", - "properties": { - "resume": { - "$ref": "#/components/schemas/IFormFile" - } - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/forms/form-files": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "required": [ - "files" - ], - "type": "object", - "properties": { - "files": { - "$ref": "#/components/schemas/IFormFileCollection" - } - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/forms/form-file-multiple": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "required": [ - "resume", - "files" - ], - "type": "object", - "allOf": [ - { - "type": "object", - "properties": { - "resume": { - "$ref": "#/components/schemas/IFormFile" - } - } - }, - { - "type": "object", - "properties": { - "files": { - "$ref": "#/components/schemas/IFormFileCollection" - } - } - } - ] - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/forms/form-todo": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/Todo" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/Todo" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/forms/forms-pocos-and-files": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "required": [ - "file" - ], - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/Todo" - }, - { - "type": "object", - "properties": { - "file": { - "$ref": "#/components/schemas/IFormFile" - } - } - } - ] - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/v1/array-of-guids": { - "get": { - "tags": [ - "Sample" - ], - "parameters": [ - { - "name": "guids", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - } - } - } - } - } - }, - "/v1/todos": { - "post": { - "tags": [ - "Sample" - ], - "summary": "Creates a new todo item.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Todo" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/v1/todos/{id}": { - "get": { - "tags": [ - "Sample" - ], - "description": "Returns a specific todo item.", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TodoWithDueDate" - } - } - } - } - } - } - }, - "/v2/users": { - "get": { - "tags": [ - "users" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - } - }, - "post": { - "tags": [ - "Sample" - ], - "operationId": "CreateUser", - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/xml/type-with-examples": { - "get": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TypeWithExamples" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TypeWithExamples" - } - } - } - } - } - } - }, - "/xml/todo": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TodoFomInterface" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/xml/project": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Project" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/xml/board": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BoardItem" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/xml/project-record": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProjectRecord" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/xml/todo-with-description": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TodoWithDescription" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/Xml": { - "get": { - "tags": [ - "Xml" - ], - "parameters": [ - { - "name": "name", - "in": "query", - "description": "The name of the person.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Returns the greeting.", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "type": "string" - } - }, - "text/json": { - "schema": { - "type": "string" - } - } - } - } - } - }, - "post": { - "tags": [ - "Xml" - ], - "requestBody": { - "description": "The todo to insert into the database.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Todo" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Todo" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Todo" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "type": "string" - } - }, - "text/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/schemas-by-ref/typed-results": { - "get": { - "tags": [ - "Sample" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Triangle" - } - } - } - } - } - } - }, - "/schemas-by-ref/multiple-results": { - "get": { - "tags": [ - "Sample" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Triangle" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/schemas-by-ref/iresult-no-produces": { - "get": { - "tags": [ - "Sample" - ], - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/schemas-by-ref/iresult-with-produces": { - "get": { - "tags": [ - "Sample" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/xml": { - "schema": { - "$ref": "#/components/schemas/Triangle" - } - } - } - } - } - } - }, - "/schemas-by-ref/primitives": { - "get": { - "tags": [ - "Sample" - ], - "parameters": [ - { - "name": "id", - "in": "query", - "description": "The ID associated with the Todo item.", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "size", - "in": "query", - "description": "The number of Todos to fetch", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/schemas-by-ref/product": { - "get": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Product" - } - } - } - } - } - } - }, - "/schemas-by-ref/account": { - "get": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Account" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Account" - } - } - } - } - } - } - }, - "/schemas-by-ref/array-of-ints": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - } - } - } - }, - "/schemas-by-ref/list-of-ints": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - } - } - } - }, - "/schemas-by-ref/ienumerable-of-ints": { - "post": { - "tags": [ - "Sample" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } - } - } - } - } - } - }, - "/schemas-by-ref/dictionary-of-ints": { - "get": { - "tags": [ - "Sample" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "int32" - } - } - } - } - } - } - } - }, - "/schemas-by-ref/frozen-dictionary-of-ints": { - "get": { - "tags": [ - "Sample" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "int32" - } - } - } - } - } - } - } - }, - "/schemas-by-ref/shape": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Shape" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/schemas-by-ref/weatherforecastbase": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WeatherForecastBase" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/schemas-by-ref/person": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Person" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/schemas-by-ref/category": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Category" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/schemas-by-ref/container": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ContainerType" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/schemas-by-ref/root": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Root" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/schemas-by-ref/location": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LocationContainer" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/schemas-by-ref/parent": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ParentObject" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/schemas-by-ref/child": { - "post": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChildObject" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/schemas-by-ref/json-patch": { - "patch": { - "tags": [ - "Sample" - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/JsonPatchDocumentOfParentObject" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/responses/200-add-xml": { - "get": { - "tags": [ - "Sample" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Todo" - } - }, - "text/xml": { - "schema": { - "$ref": "#/components/schemas/Todo" - } - } - } - } - } - } - }, - "/responses/200-only-xml": { - "get": { - "tags": [ - "Sample" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/xml": { - "schema": { - "$ref": "#/components/schemas/Todo" - } - } - } - } - } - } - }, - "/responses/triangle": { - "get": { - "tags": [ - "Sample" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Triangle" - } - } - } - } - } - } - }, - "/responses/shape": { - "get": { - "tags": [ - "Sample" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Shape" - } - } - } - } - } - } - }, - "/getbyidandname/{id}/{name}": { - "get": { - "tags": [ - "Test" - ], - "parameters": [ - { - "name": "Id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "Name", - "in": "path", - "required": true, - "schema": { - "minLength": 5, - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - }, - "application/json": { - "schema": { - "type": "string" - } - }, - "text/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/gettypedresult": { - "get": { - "tags": [ - "Test" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MvcTodo" - } - } - } - } - } - } - }, - "/forms": { - "post": { - "tags": [ - "Test" - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "type": "object", - "properties": { - "Title": { - "type": "string" - }, - "Description": { - "type": "string" - }, - "IsCompleted": { - "type": "boolean" - } - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/getcultureinvariant": { - "get": { - "tags": [ - "Test" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CurrentWeather" - } - } - } - } - } - } - }, - "/query": { - "query": { - "tags": [ - "Test" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/CurrentWeather" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/CurrentWeather" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/CurrentWeather" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Account": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string" - } - } - }, - "AddressDto": { - "required": [ - "relatedLocation" - ], - "type": "object", - "properties": { - "relatedLocation": { - "$ref": "#/components/schemas/LocationDto" - } - } - }, - "BoardItem": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "description": "An item on the board." - }, - "Category": { - "required": [ - "name", - "parent" - ], - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "parent": { - "$ref": "#/components/schemas/Category" - }, - "tags": { - "$ref": "#/components/schemas/Category/properties/parent/properties/tags" - } - } - }, - "ChildObject": { - "required": [ - "parent" - ], - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "parent": { - "$ref": "#/components/schemas/ParentObject" - } - } - }, - "ContainerType": { - "type": "object", - "properties": { - "seq1": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "seq2": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ContainerType/properties/seq1/items" - } - } - } - }, - "CurrentWeather": { - "type": "object", - "properties": { - "temperature": { - "maximum": 100.5, - "minimum": -100.5, - "type": "number", - "format": "float", - "default": 0.1 - } - } - }, - "IFormFile": { - "type": "string", - "format": "binary" - }, - "IFormFileCollection": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IFormFile" - } - }, - "Item": { - "type": "object", - "properties": { - "name": { - "$ref": "#/components/schemas/Root/properties/item1/properties/name" - }, - "value": { - "type": "integer", - "format": "int32" - } - } - }, - "JsonPatchDocumentOfParentObject": { }, - "LocationContainer": { - "required": [ - "location" - ], - "type": "object", - "properties": { - "location": { - "$ref": "#/components/schemas/LocationDto" - } - } - }, - "LocationDto": { - "required": [ - "address" - ], - "type": "object", - "properties": { - "address": { - "$ref": "#/components/schemas/AddressDto" - } - } - }, - "MvcTodo": { - "required": [ - "title", - "description", - "isCompleted" - ], - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "isCompleted": { - "type": "boolean" - } - } - }, - "ParentObject": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChildObject" - } - } - } - }, - "Person": { - "required": [ - "discriminator" - ], - "type": "object", - "anyOf": [ - { - "$ref": "#/components/schemas/PersonStudent" - }, - { - "$ref": "#/components/schemas/PersonTeacher" - } - ], - "discriminator": { - "propertyName": "discriminator", - "mapping": { - "student": "#/components/schemas/PersonStudent", - "teacher": "#/components/schemas/PersonTeacher" - } - } - }, - "PersonStudent": { - "properties": { - "discriminator": { - "enum": [ - "student" - ], - "type": "string" - }, - "gpa": { - "type": "number", - "format": "double" - } - } - }, - "PersonTeacher": { - "required": [ - "subject" - ], - "properties": { - "discriminator": { - "enum": [ - "teacher" - ], - "type": "string" - }, - "subject": { - "type": "string" - } - } - }, - "Product": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string" - } - } - }, - "Project": { - "required": [ - "name", - "description" - ], - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "description": "The project that contains Todo items." - }, - "ProjectRecord": { - "required": [ - "name", - "description" - ], - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the project." - }, - "description": { - "type": "string", - "description": "The description of the project." - } - }, - "description": "The project that contains Todo items." - }, - "Root": { - "type": "object", - "properties": { - "item1": { - "$ref": "#/components/schemas/Item" - }, - "item2": { - "$ref": "#/components/schemas/Item" - } - } - }, - "Shape": { - "required": [ - "$type" - ], - "type": "object", - "anyOf": [ - { - "$ref": "#/components/schemas/ShapeTriangle" - }, - { - "$ref": "#/components/schemas/ShapeSquare" - } - ], - "discriminator": { - "propertyName": "$type", - "mapping": { - "triangle": "#/components/schemas/ShapeTriangle", - "square": "#/components/schemas/ShapeSquare" - } - } - }, - "ShapeSquare": { - "properties": { - "$type": { - "enum": [ - "square" - ], - "type": "string" - }, - "area": { - "type": "number", - "format": "double" - }, - "color": { - "type": "string" - }, - "sides": { - "type": "integer", - "format": "int32" - } - } - }, - "ShapeTriangle": { - "properties": { - "$type": { - "enum": [ - "triangle" - ], - "type": "string" - }, - "hypotenuse": { - "type": "number", - "format": "double" - }, - "color": { - "type": "string" - }, - "sides": { - "type": "integer", - "format": "int32" - } - } - }, - "Tag": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - }, - "Todo": { - "required": [ - "id", - "title", - "completed", - "createdAt" - ], - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "The unique identifier of the to-do item.", - "format": "int32" - }, - "title": { - "type": "string", - "description": "The title of the to-do item." - }, - "completed": { - "type": "boolean", - "description": "Indicates whether the to-do item is completed." - }, - "createdAt": { - "type": "string", - "description": "The date and time when the to-do item was created.", - "format": "date-time" - } - }, - "description": "Represents a to-do item." - }, - "TodoFomInterface": { - "required": [ - "name", - "description" - ], - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "The identifier of the todo.", - "format": "int32" - }, - "name": { - "type": "string", - "description": "The name of the todo." - }, - "description": { - "type": "string", - "description": "A description of the todo." - } - }, - "description": "This is a todo item." - }, - "TodoWithDescription": { - "required": [ - "name", - "description" - ], - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "The identifier of the todo, overridden.", - "format": "int32" - }, - "name": { - "type": "string", - "description": "The name of the todo, overridden." - }, - "description": { - "type": "string", - "description": "Another description of the todo." - } - } - }, - "TodoWithDueDate": { - "required": [ - "dueDate", - "id", - "title", - "completed", - "createdAt" - ], - "type": "object", - "properties": { - "dueDate": { - "type": "string", - "description": "The due date of the to-do item.", - "format": "date-time" - }, - "id": { - "type": "integer", - "description": "The unique identifier of the to-do item.", - "format": "int32" - }, - "title": { - "type": "string", - "description": "The title of the to-do item." - }, - "completed": { - "type": "boolean", - "description": "Indicates whether the to-do item is completed." - }, - "createdAt": { - "type": "string", - "description": "The date and time when the to-do item was created.", - "format": "date-time" - } - }, - "description": "Represents a to-do item with a due date." - }, - "Triangle": { - "type": "object", - "properties": { - "hypotenuse": { - "type": "number", - "format": "double" - }, - "color": { - "type": "string" - }, - "sides": { - "type": "integer", - "format": "int32" - } - } - }, - "TypeWithExamples": { - "type": "object", - "properties": { - "booleanType": { - "type": "boolean", - "example": true - }, - "integerType": { - "type": "integer", - "format": "int32", - "example": 42 - }, - "longType": { - "type": "integer", - "format": "int64", - "example": 1234567890123456789 - }, - "doubleType": { - "type": "number", - "format": "double", - "example": 3.14 - }, - "floatType": { - "type": "number", - "format": "float", - "example": 3.14 - }, - "dateTimeType": { - "type": "string", - "format": "date-time", - "example": "2022-01-01T00:00:00Z" - }, - "dateOnlyType": { - "type": "string", - "format": "date", - "example": "2022-01-01" - } - } - }, - "WeatherForecastBase": { - "required": [ - "$type" - ], - "type": "object", - "anyOf": [ - { - "$ref": "#/components/schemas/WeatherForecastBaseWeatherForecastWithCity" - }, - { - "$ref": "#/components/schemas/WeatherForecastBaseWeatherForecastWithTimeSeries" - }, - { - "$ref": "#/components/schemas/WeatherForecastBaseWeatherForecastWithLocalNews" - } - ], - "discriminator": { - "propertyName": "$type", - "mapping": { - "0": "#/components/schemas/WeatherForecastBaseWeatherForecastWithCity", - "1": "#/components/schemas/WeatherForecastBaseWeatherForecastWithTimeSeries", - "2": "#/components/schemas/WeatherForecastBaseWeatherForecastWithLocalNews" - } - } - }, - "WeatherForecastBaseWeatherForecastWithCity": { - "required": [ - "city" - ], - "properties": { - "$type": { - "enum": [ - 0 - ], - "type": "integer" - }, - "city": { - "type": "string" - } - } - }, - "WeatherForecastBaseWeatherForecastWithLocalNews": { - "required": [ - "news" - ], - "properties": { - "$type": { - "enum": [ - 2 - ], - "type": "integer" - }, - "news": { - "type": "string" - } - } - }, - "WeatherForecastBaseWeatherForecastWithTimeSeries": { - "required": [ - "summary" - ], - "properties": { - "$type": { - "enum": [ - 1 - ], - "type": "integer" - }, - "date": { - "type": "string", - "format": "date-time" - }, - "temperatureC": { - "type": "integer", - "format": "int32" - }, - "summary": { - "type": "string" - } - } - } - } - }, - "tags": [ - { - "name": "Sample" - }, - { - "name": "users" - }, - { - "name": "Xml" - }, - { - "name": "Test" - } - ] -} \ No newline at end of file