Fixes #2716: XML response example for Arrays #2896
Open
Annotations
10 errors
Build, Package and Test
VerifyException : Directory: /Users/runner/work/Swashbuckle.AspNetCore/Swashbuckle.AspNetCore/test/Swashbuckle.AspNetCore.SwaggerGen.Test/SwaggerGeneratorVerifyTests
NotEqual:
- Received: SwaggerGeneratorVerifyTests.GetSwagger_Copies_Description_From_GeneratedSchema.DotNet6_0.received.txt
Verified: SwaggerGeneratorVerifyTests.GetSwagger_Copies_Description_From_GeneratedSchema.verified.txt
FileContent:
NotEqual:
Received: SwaggerGeneratorVerifyTests.GetSwagger_Copies_Description_From_GeneratedSchema.DotNet6_0.received.txt
{
Info: {
Title: Test API,
Version: V1
},
Paths: {
/resource: {
Operations: {
Post: {
Tags: [
{
Name: Fake,
UnresolvedReference: false
}
],
Parameters: [
{
UnresolvedReference: false,
Name: EnumWithDefault,
In: Query,
Description: <p>Members:</p><ul><li>Value2 - 2</li><li>Value4 - 4</li><li>Value8 - 8</li></ul>,
Required: false,
Deprecated: false,
AllowEmptyValue: false,
Style: Form,
Explode: true,
AllowReserved: false,
Schema: {
ReadOnly: false,
WriteOnly: false,
AdditionalPropertiesAllowed: true,
Nullable: false,
Deprecated: false,
UnresolvedReference: false,
Reference: {
IsFragrament: false,
Type: Schema,
Id: IntEnum,
IsExternal: false,
IsLocal: true,
ReferenceV3: #/components/schemas/IntEnum,
ReferenceV2: #/definitions/IntEnum
}
}
},
{
UnresolvedReference: false,
Name: EnumArrayWithDefault,
In: Query,
Description: <p>Members:</p><ul><li>Value2 - 2</li><li>Value4 - 4</li><li>Value8 - 8</li></ul>,
Required: false,
Deprecated: false,
AllowEmptyValue: false,
Style: Form,
Explode: true,
AllowReserved: false,
Schema: {
Type: array,
Description: <p>Members:</p><ul><li>Value2 - 2</li><li>Value4 - 4</li><li>Value8 - 8</li></ul>,
Default: [
{
Value: 4
}
],
ReadOnly: false,
WriteOnly: false,
Items: {
ReadOnly: false,
WriteOnly: false,
AdditionalPropertiesAllowed: true,
Nullable: false,
Deprecated: false,
UnresolvedReference: false,
Reference: {
IsFragrament: false,
Type: Schema,
Id: IntEnum,
IsExternal: false,
IsLocal: true,
ReferenceV3: #/components/schemas/IntEnum,
ReferenceV2: #/definitions/IntEnum
}
},
AdditionalPropertiesAllowed: true,
Nullable: false,
Deprecated: false,
Xml: {
Name: IntEnum,
Attribute: false,
Wrapped: true
},
UnresolvedReference: false
}
}
],
Responses: {
200: {
Description: OK,
UnresolvedReference: false
}
},
Deprecated: false
}
},
UnresolvedReference: false
}
},
Components: {
Schemas: {
IntEnum: {
Type: integer,
Format: int32,
Description: <p>Members:</p><ul><li>Value2 - 2</li><li>Value4 - 4</li><li>Value8 - 8</li></ul>,
ReadOnly: false,
WriteOnly: false,
Addi
|
Build, Package and Test
VerifyException : Directory: /Users/runner/work/Swashbuckle.AspNetCore/Swashbuckle.AspNetCore/test/Swashbuckle.AspNetCore.SwaggerGen.Test/SwaggerGeneratorVerifyTests
NotEqual:
- Received: SwaggerGeneratorVerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithSeveralFromForms.DotNet6_0.received.txt
Verified: SwaggerGeneratorVerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithSeveralFromForms.verified.txt
FileContent:
NotEqual:
Received: SwaggerGeneratorVerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithSeveralFromForms.DotNet6_0.received.txt
{
Info: {
Title: Test API,
Version: V1
},
Paths: {
/resource: {
Operations: {
Post: {
OperationId: OperationIdSetInMetadata,
RequestBody: {
UnresolvedReference: false,
Required: false,
Content: {
application/someMediaType: {
Schema: {
ReadOnly: false,
WriteOnly: false,
AllOf: [
{
ReadOnly: false,
WriteOnly: false,
AdditionalPropertiesAllowed: true,
Nullable: false,
Deprecated: false,
UnresolvedReference: false,
Reference: {
IsFragrament: false,
Type: Schema,
Id: TestDto,
IsExternal: false,
IsLocal: true,
ReferenceV3: #/components/schemas/TestDto,
ReferenceV2: #/definitions/TestDto
}
},
{
ReadOnly: false,
WriteOnly: false,
AdditionalPropertiesAllowed: true,
Nullable: false,
Deprecated: false,
UnresolvedReference: false,
Reference: {
IsFragrament: false,
Type: Schema,
Id: TypeWithDefaultAttributeOnEnum,
IsExternal: false,
IsLocal: true,
ReferenceV3: #/components/schemas/TypeWithDefaultAttributeOnEnum,
ReferenceV2: #/definitions/TypeWithDefaultAttributeOnEnum
}
}
],
AdditionalPropertiesAllowed: true,
Nullable: false,
Deprecated: false,
UnresolvedReference: false
}
}
}
},
Deprecated: false
}
},
UnresolvedReference: false
}
},
Components: {
Schemas: {
IntEnum: {
Type: integer,
Format: int32,
ReadOnly: false,
WriteOnly: false,
AdditionalPropertiesAllowed: true,
Enum: [
{
Value: 2
},
{
Value: 4
},
{
Value: 8
}
],
Nullable: false,
Deprecated: false,
UnresolvedReference: false
},
TestDto: {
Type: object,
ReadOnly: false,
WriteOnly: false,
Properties: {
Prop1: {
Type: string,
ReadOnly: false,
WriteOnly: false,
AdditionalPropertiesAllowed: true,
Nullable: true,
Deprecated: false,
UnresolvedReference: false
}
},
AdditionalPropertiesAllowed: false,
Nullable: false,
Deprecated: false,
UnresolvedReference: false
},
TypeWithDefaultAttributeOnEnum: {
Type: object,
ReadOnly: false,
WriteOnly: false,
Properties: {
EnumArrayWithDefault: {
Type: array,
Default: [
{
|
Build, Package and Test
VerifyException : Directory: /Users/runner/work/Swashbuckle.AspNetCore/Swashbuckle.AspNetCore/test/Swashbuckle.AspNetCore.SwaggerGen.Test/SwaggerGeneratorVerifyTests
NotEqual:
- Received: SwaggerGeneratorVerifyTests.GetSwagger_Copies_Description_From_GeneratedSchema.DotNet7_0.received.txt
Verified: SwaggerGeneratorVerifyTests.GetSwagger_Copies_Description_From_GeneratedSchema.verified.txt
FileContent:
NotEqual:
Received: SwaggerGeneratorVerifyTests.GetSwagger_Copies_Description_From_GeneratedSchema.DotNet7_0.received.txt
{
Info: {
Title: Test API,
Version: V1
},
Paths: {
/resource: {
Operations: {
Post: {
Tags: [
{
Name: Fake,
UnresolvedReference: false
}
],
Parameters: [
{
UnresolvedReference: false,
Name: EnumWithDefault,
In: Query,
Description: <p>Members:</p><ul><li>Value2 - 2</li><li>Value4 - 4</li><li>Value8 - 8</li></ul>,
Required: false,
Deprecated: false,
AllowEmptyValue: false,
Style: Form,
Explode: true,
AllowReserved: false,
Schema: {
ReadOnly: false,
WriteOnly: false,
AdditionalPropertiesAllowed: true,
Nullable: false,
Deprecated: false,
UnresolvedReference: false,
Reference: {
IsFragrament: false,
Type: Schema,
Id: IntEnum,
IsExternal: false,
IsLocal: true,
ReferenceV3: #/components/schemas/IntEnum,
ReferenceV2: #/definitions/IntEnum
}
}
},
{
UnresolvedReference: false,
Name: EnumArrayWithDefault,
In: Query,
Description: <p>Members:</p><ul><li>Value2 - 2</li><li>Value4 - 4</li><li>Value8 - 8</li></ul>,
Required: false,
Deprecated: false,
AllowEmptyValue: false,
Style: Form,
Explode: true,
AllowReserved: false,
Schema: {
Type: array,
Description: <p>Members:</p><ul><li>Value2 - 2</li><li>Value4 - 4</li><li>Value8 - 8</li></ul>,
Default: [
{
Value: 4
}
],
ReadOnly: false,
WriteOnly: false,
Items: {
ReadOnly: false,
WriteOnly: false,
AdditionalPropertiesAllowed: true,
Nullable: false,
Deprecated: false,
UnresolvedReference: false,
Reference: {
IsFragrament: false,
Type: Schema,
Id: IntEnum,
IsExternal: false,
IsLocal: true,
ReferenceV3: #/components/schemas/IntEnum,
ReferenceV2: #/definitions/IntEnum
}
},
AdditionalPropertiesAllowed: true,
Nullable: false,
Deprecated: false,
Xml: {
Name: IntEnum,
Attribute: false,
Wrapped: true
},
UnresolvedReference: false
}
}
],
Responses: {
200: {
Description: OK,
UnresolvedReference: false
}
},
Deprecated: false
}
},
UnresolvedReference: false
}
},
Components: {
Schemas: {
IntEnum: {
Type: integer,
Format: int32,
Description: <p>Members:</p><ul><li>Value2 - 2</li><li>Value4 - 4</li><li>Value8 - 8</li></ul>,
ReadOnly: false,
WriteOnly: false,
Addi
|
Build, Package and Test
VerifyException : Directory: /Users/runner/work/Swashbuckle.AspNetCore/Swashbuckle.AspNetCore/test/Swashbuckle.AspNetCore.SwaggerGen.Test/SwaggerGeneratorVerifyTests
NotEqual:
- Received: SwaggerGeneratorVerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithSeveralFromForms.DotNet7_0.received.txt
Verified: SwaggerGeneratorVerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithSeveralFromForms.verified.txt
FileContent:
NotEqual:
Received: SwaggerGeneratorVerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithSeveralFromForms.DotNet7_0.received.txt
{
Info: {
Title: Test API,
Version: V1
},
Paths: {
/resource: {
Operations: {
Post: {
OperationId: OperationIdSetInMetadata,
RequestBody: {
UnresolvedReference: false,
Required: false,
Content: {
application/someMediaType: {
Schema: {
ReadOnly: false,
WriteOnly: false,
AllOf: [
{
ReadOnly: false,
WriteOnly: false,
AdditionalPropertiesAllowed: true,
Nullable: false,
Deprecated: false,
UnresolvedReference: false,
Reference: {
IsFragrament: false,
Type: Schema,
Id: TestDto,
IsExternal: false,
IsLocal: true,
ReferenceV3: #/components/schemas/TestDto,
ReferenceV2: #/definitions/TestDto
}
},
{
ReadOnly: false,
WriteOnly: false,
AdditionalPropertiesAllowed: true,
Nullable: false,
Deprecated: false,
UnresolvedReference: false,
Reference: {
IsFragrament: false,
Type: Schema,
Id: TypeWithDefaultAttributeOnEnum,
IsExternal: false,
IsLocal: true,
ReferenceV3: #/components/schemas/TypeWithDefaultAttributeOnEnum,
ReferenceV2: #/definitions/TypeWithDefaultAttributeOnEnum
}
}
],
AdditionalPropertiesAllowed: true,
Nullable: false,
Deprecated: false,
UnresolvedReference: false
}
}
}
},
Deprecated: false
}
},
UnresolvedReference: false
}
},
Components: {
Schemas: {
IntEnum: {
Type: integer,
Format: int32,
ReadOnly: false,
WriteOnly: false,
AdditionalPropertiesAllowed: true,
Enum: [
{
Value: 2
},
{
Value: 4
},
{
Value: 8
}
],
Nullable: false,
Deprecated: false,
UnresolvedReference: false
},
TestDto: {
Type: object,
ReadOnly: false,
WriteOnly: false,
Properties: {
Prop1: {
Type: string,
ReadOnly: false,
WriteOnly: false,
AdditionalPropertiesAllowed: true,
Nullable: true,
Deprecated: false,
UnresolvedReference: false
}
},
AdditionalPropertiesAllowed: false,
Nullable: false,
Deprecated: false,
UnresolvedReference: false
},
TypeWithDefaultAttributeOnEnum: {
Type: object,
ReadOnly: false,
WriteOnly: false,
Properties: {
EnumArrayWithDefault: {
Type: array,
Default: [
{
|
Build, Package and Test
VerifyException : Directory: /Users/runner/work/Swashbuckle.AspNetCore/Swashbuckle.AspNetCore/test/Swashbuckle.AspNetCore.SwaggerGen.Test/SwaggerGeneratorVerifyTests
NotEqual:
- Received: SwaggerGeneratorVerifyTests.GetSwagger_Copies_Description_From_GeneratedSchema.DotNet8_0.received.txt
Verified: SwaggerGeneratorVerifyTests.GetSwagger_Copies_Description_From_GeneratedSchema.verified.txt
FileContent:
NotEqual:
Received: SwaggerGeneratorVerifyTests.GetSwagger_Copies_Description_From_GeneratedSchema.DotNet8_0.received.txt
{
Info: {
Title: Test API,
Version: V1
},
Paths: {
/resource: {
Operations: {
Post: {
Tags: [
{
Name: Fake,
UnresolvedReference: false
}
],
Parameters: [
{
UnresolvedReference: false,
Name: EnumWithDefault,
In: Query,
Description: <p>Members:</p><ul><li>Value2 - 2</li><li>Value4 - 4</li><li>Value8 - 8</li></ul>,
Required: false,
Deprecated: false,
AllowEmptyValue: false,
Style: Form,
Explode: true,
AllowReserved: false,
Schema: {
ReadOnly: false,
WriteOnly: false,
AdditionalPropertiesAllowed: true,
Nullable: false,
Deprecated: false,
UnresolvedReference: false,
Reference: {
IsFragrament: false,
Type: Schema,
Id: IntEnum,
IsExternal: false,
IsLocal: true,
ReferenceV3: #/components/schemas/IntEnum,
ReferenceV2: #/definitions/IntEnum
}
}
},
{
UnresolvedReference: false,
Name: EnumArrayWithDefault,
In: Query,
Description: <p>Members:</p><ul><li>Value2 - 2</li><li>Value4 - 4</li><li>Value8 - 8</li></ul>,
Required: false,
Deprecated: false,
AllowEmptyValue: false,
Style: Form,
Explode: true,
AllowReserved: false,
Schema: {
Type: array,
Description: <p>Members:</p><ul><li>Value2 - 2</li><li>Value4 - 4</li><li>Value8 - 8</li></ul>,
Default: [
{
Value: 4
}
],
ReadOnly: false,
WriteOnly: false,
Items: {
ReadOnly: false,
WriteOnly: false,
AdditionalPropertiesAllowed: true,
Nullable: false,
Deprecated: false,
UnresolvedReference: false,
Reference: {
IsFragrament: false,
Type: Schema,
Id: IntEnum,
IsExternal: false,
IsLocal: true,
ReferenceV3: #/components/schemas/IntEnum,
ReferenceV2: #/definitions/IntEnum
}
},
AdditionalPropertiesAllowed: true,
Nullable: false,
Deprecated: false,
Xml: {
Name: IntEnum,
Attribute: false,
Wrapped: true
},
UnresolvedReference: false
}
}
],
Responses: {
200: {
Description: OK,
UnresolvedReference: false
}
},
Deprecated: false
}
},
UnresolvedReference: false
}
},
Components: {
Schemas: {
IntEnum: {
Type: integer,
Format: int32,
Description: <p>Members:</p><ul><li>Value2 - 2</li><li>Value4 - 4</li><li>Value8 - 8</li></ul>,
ReadOnly: false,
WriteOnly: false,
Addi
|
Build, Package and Test
VerifyException : Directory: /Users/runner/work/Swashbuckle.AspNetCore/Swashbuckle.AspNetCore/test/Swashbuckle.AspNetCore.SwaggerGen.Test/SwaggerGeneratorVerifyTests
NotEqual:
- Received: SwaggerGeneratorVerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithSeveralFromForms.DotNet8_0.received.txt
Verified: SwaggerGeneratorVerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithSeveralFromForms.verified.txt
FileContent:
NotEqual:
Received: SwaggerGeneratorVerifyTests.GetSwagger_GenerateConsumesSchemas_ForProvidedOpenApiOperationWithSeveralFromForms.DotNet8_0.received.txt
{
Info: {
Title: Test API,
Version: V1
},
Paths: {
/resource: {
Operations: {
Post: {
OperationId: OperationIdSetInMetadata,
RequestBody: {
UnresolvedReference: false,
Required: false,
Content: {
application/someMediaType: {
Schema: {
ReadOnly: false,
WriteOnly: false,
AllOf: [
{
ReadOnly: false,
WriteOnly: false,
AdditionalPropertiesAllowed: true,
Nullable: false,
Deprecated: false,
UnresolvedReference: false,
Reference: {
IsFragrament: false,
Type: Schema,
Id: TestDto,
IsExternal: false,
IsLocal: true,
ReferenceV3: #/components/schemas/TestDto,
ReferenceV2: #/definitions/TestDto
}
},
{
ReadOnly: false,
WriteOnly: false,
AdditionalPropertiesAllowed: true,
Nullable: false,
Deprecated: false,
UnresolvedReference: false,
Reference: {
IsFragrament: false,
Type: Schema,
Id: TypeWithDefaultAttributeOnEnum,
IsExternal: false,
IsLocal: true,
ReferenceV3: #/components/schemas/TypeWithDefaultAttributeOnEnum,
ReferenceV2: #/definitions/TypeWithDefaultAttributeOnEnum
}
}
],
AdditionalPropertiesAllowed: true,
Nullable: false,
Deprecated: false,
UnresolvedReference: false
}
}
}
},
Deprecated: false
}
},
UnresolvedReference: false
}
},
Components: {
Schemas: {
IntEnum: {
Type: integer,
Format: int32,
ReadOnly: false,
WriteOnly: false,
AdditionalPropertiesAllowed: true,
Enum: [
{
Value: 2
},
{
Value: 4
},
{
Value: 8
}
],
Nullable: false,
Deprecated: false,
UnresolvedReference: false
},
TestDto: {
Type: object,
ReadOnly: false,
WriteOnly: false,
Properties: {
Prop1: {
Type: string,
ReadOnly: false,
WriteOnly: false,
AdditionalPropertiesAllowed: true,
Nullable: true,
Deprecated: false,
UnresolvedReference: false
}
},
AdditionalPropertiesAllowed: false,
Nullable: false,
Deprecated: false,
UnresolvedReference: false
},
TypeWithDefaultAttributeOnEnum: {
Type: object,
ReadOnly: false,
WriteOnly: false,
Properties: {
EnumArrayWithDefault: {
Type: array,
Default: [
{
|
Build, Package and Test
VerifyException : Directory: /Users/runner/work/Swashbuckle.AspNetCore/Swashbuckle.AspNetCore/test/Swashbuckle.AspNetCore.IntegrationTests
NotEqual:
- Received: SwaggerVerifyIntegrationTest.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=ConfigFromFile.Startup_swaggerRequestUri=v1.DotNet6_0.received.txt
Verified: SwaggerVerifyIntegrationTest.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=ConfigFromFile.Startup_swaggerRequestUri=v1.verified.txt
FileContent:
NotEqual:
Received: SwaggerVerifyIntegrationTest.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=ConfigFromFile.Startup_swaggerRequestUri=v1.DotNet6_0.received.txt
{
"openapi": "3.0.1",
"info": {
"title": "ConfigFromFile",
"version": "1.0"
},
"paths": {
"/api/Products": {
"get": {
"tags": [
"Products"
],
"responses": {
"200": {
"description": "OK",
"content": {
"text/plain": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
},
"xml": {
"name": "Product",
"wrapped": true
}
}
},
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
},
"xml": {
"name": "Product",
"wrapped": true
}
}
},
"text/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
},
"xml": {
"name": "Product",
"wrapped": true
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Product": {
"type": "object",
"properties": {
"foo": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"xml": {
"name": "Int32",
"wrapped": true
}
},
"nullable": true,
"xml": {
"name": "Int32[]",
"wrapped": true
}
}
},
"additionalProperties": false
}
}
}
}
Verified: SwaggerVerifyIntegrationTest.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=ConfigFromFile.Startup_swaggerRequestUri=v1.verified.txt
{
"openapi": "3.0.1",
"info": {
"title": "ConfigFromFile",
"version": "1.0"
},
"paths": {
"/api/Products": {
"get": {
"tags": [
"Products"
],
"responses": {
"200": {
"description": "OK",
"content": {
"text/plain": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
}
}
},
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
}
}
},
"text/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Product": {
"type": "object",
"properties": {
"foo": {
"type": "array",
"
|
Build, Package and Test
VerifyException : Directory: /Users/runner/work/Swashbuckle.AspNetCore/Swashbuckle.AspNetCore/test/Swashbuckle.AspNetCore.IntegrationTests
NotEqual:
- Received: SwaggerVerifyIntegrationTest.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=MultipleVersions.Startup_swaggerRequestUri=1.0.DotNet6_0.received.txt
Verified: SwaggerVerifyIntegrationTest.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=MultipleVersions.Startup_swaggerRequestUri=1.0.verified.txt
FileContent:
NotEqual:
Received: SwaggerVerifyIntegrationTest.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=MultipleVersions.Startup_swaggerRequestUri=1.0.DotNet6_0.received.txt
{
"openapi": "3.0.1",
"info": {
"title": "Sample API 1.0",
"version": "1.0"
},
"paths": {
"/Products": {
"get": {
"tags": [
"Products"
],
"parameters": [
{
"name": "api-version",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"text/plain": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
},
"xml": {
"name": "Product",
"wrapped": true
}
}
},
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
},
"xml": {
"name": "Product",
"wrapped": true
}
}
},
"text/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
},
"xml": {
"name": "Product",
"wrapped": true
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Product": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32"
},
"description": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
}
}
}
}
Verified: SwaggerVerifyIntegrationTest.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=MultipleVersions.Startup_swaggerRequestUri=1.0.verified.txt
{
"openapi": "3.0.1",
"info": {
"title": "Sample API 1.0",
"version": "1.0"
},
"paths": {
"/Products": {
"get": {
"tags": [
"Products"
],
"parameters": [
{
"name": "api-version",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"text/plain": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
}
}
},
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
}
}
},
"text/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
}
}
}
}
}
}
}
}
},
"
|
Build, Package and Test
VerifyException : Directory: /Users/runner/work/Swashbuckle.AspNetCore/Swashbuckle.AspNetCore/test/Swashbuckle.AspNetCore.IntegrationTests
NotEqual:
- Received: SwaggerVerifyIntegrationTest.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIConfig.Startup_swaggerRequestUri=v1.DotNet6_0.received.txt
Verified: SwaggerVerifyIntegrationTest.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIConfig.Startup_swaggerRequestUri=v1.verified.txt
FileContent:
NotEqual:
Received: SwaggerVerifyIntegrationTest.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIConfig.Startup_swaggerRequestUri=v1.DotNet6_0.received.txt
{
"openapi": "3.0.1",
"info": {
"title": "CustomUIConfig",
"version": "1.0"
},
"paths": {
"/products": {
"get": {
"tags": [
"Products"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
},
"xml": {
"name": "Product",
"wrapped": true
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Product": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32"
},
"description": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
}
}
}
}
Verified: SwaggerVerifyIntegrationTest.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIConfig.Startup_swaggerRequestUri=v1.verified.txt
{
"openapi": "3.0.1",
"info": {
"title": "CustomUIConfig",
"version": "1.0"
},
"paths": {
"/products": {
"get": {
"tags": [
"Products"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Product": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32"
},
"description": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
}
}
}
}
|
Build, Package and Test
VerifyException : Directory: /Users/runner/work/Swashbuckle.AspNetCore/Swashbuckle.AspNetCore/test/Swashbuckle.AspNetCore.IntegrationTests
NotEqual:
- Received: SwaggerVerifyIntegrationTest.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIIndex.Startup_swaggerRequestUri=v1.DotNet6_0.received.txt
Verified: SwaggerVerifyIntegrationTest.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIIndex.Startup_swaggerRequestUri=v1.verified.txt
FileContent:
NotEqual:
Received: SwaggerVerifyIntegrationTest.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIIndex.Startup_swaggerRequestUri=v1.DotNet6_0.received.txt
{
"openapi": "3.0.1",
"info": {
"title": "CustomUIIndex",
"version": "1.0"
},
"paths": {
"/products": {
"get": {
"tags": [
"Products"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
},
"xml": {
"name": "Product",
"wrapped": true
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Product": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32"
},
"description": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
}
}
}
}
Verified: SwaggerVerifyIntegrationTest.SwaggerEndpoint_ReturnsValidSwaggerJson_startupType=CustomUIIndex.Startup_swaggerRequestUri=v1.verified.txt
{
"openapi": "3.0.1",
"info": {
"title": "CustomUIIndex",
"version": "1.0"
},
"paths": {
"/products": {
"get": {
"tags": [
"Products"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Product"
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Product": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32"
},
"description": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
}
}
}
}
|
Loading