forked from domaindrivendev/Swashbuckle.AspNetCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid competing swagger generation during test build (domaindrivendev…
…#2897) The previous implementation caused the concurrent builds for various frameworks to compete in writing to the output `swagger.json` file, causing exceptions during builds (since it happened in csproj). In my local development I often failed to rebuild the full solution because some projects failed to build for this reason. It has also happened in CI (domaindrivendev#2886). Note that the NSwag source code generator in `NswagClientExample` still outputs everything in one spot for all frameworks, but I haven't noticed failures from that. Maybe it's just less likely to write concurrently. I left it as is. Un-skip the `Overwrites_Existing_File` test.
- Loading branch information
1 parent
e1b56e1
commit 77cde47
Showing
13 changed files
with
365 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,4 +51,4 @@ | |
} | ||
} | ||
} | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
test/WebSites/CliExample/wwwroot/swagger/v1/swagger_net7.0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"openapi": "3.0.1", | ||
"info": { | ||
"title": "CliExample", | ||
"version": "1.0" | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "http://localhost:51071" | ||
} | ||
], | ||
"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 | ||
} | ||
} | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
test/WebSites/CliExample/wwwroot/swagger/v1/swagger_net8.0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"openapi": "3.0.1", | ||
"info": { | ||
"title": "CliExample", | ||
"version": "1.0" | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "http://localhost:51071" | ||
} | ||
], | ||
"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 | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,4 +51,4 @@ | |
} | ||
} | ||
} | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
test/WebSites/CliExampleWithFactory/wwwroot/swagger/v1/swagger_net7.0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"openapi": "3.0.1", | ||
"info": { | ||
"title": "CliExampleWithFactory", | ||
"version": "1.0" | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "http://localhost:57556/" | ||
} | ||
], | ||
"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 | ||
} | ||
} | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
test/WebSites/CliExampleWithFactory/wwwroot/swagger/v1/swagger_net8.0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"openapi": "3.0.1", | ||
"info": { | ||
"title": "CliExampleWithFactory", | ||
"version": "1.0" | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "http://localhost:57556/" | ||
} | ||
], | ||
"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 | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,4 +137,4 @@ | |
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.