-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): executor to generate swagger json (#437)
Adds a new target to projects created with the `webapi` template by default called `swagger`. You can add this target (and supporting library) to any existing apis by running via `nx g @nx-dotnet/core:add-swagger-target` This generates/updates a `swagger.json` file inside a supporting library. The end goal is that you would use this generated file to generate typescript interfaces. > Generation of `swagger.json` assumes that your webapi project uses `Swashbuckle.AspNetCore`, and does have swagger setup. If it does not, this target + supporting library **will not** function out of the box.
- Loading branch information
1 parent
8bacf69
commit 6c33d1a
Showing
65 changed files
with
654 additions
and
476 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# @nx-dotnet/core:update-swagger | ||
|
||
## Swagger executor | ||
|
||
Extract openapi swagger documentation from the webapi | ||
|
||
## Options | ||
|
||
### output | ||
|
||
- (string): Where should the swagger output be stored | ||
|
||
### swaggerDoc | ||
|
||
- (string): Which swagger doc should be used? | ||
|
||
### startupAssembly | ||
|
||
- (string): Path from workspace root to the built api's startup dll file |
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,27 @@ | ||
# @nx-dotnet/core:add-swagger-target | ||
|
||
## Swagger Target Generator | ||
|
||
Generates a swagger setup for a given project | ||
|
||
## Options | ||
|
||
### swaggerDoc | ||
|
||
- (string): Which swagger doc should be used? | ||
|
||
### startupAssembly | ||
|
||
- (string): Path from workspace root to the built api's startup dll file | ||
|
||
### <span className="required">project</span> | ||
|
||
- (string): Which project should the target be added to? | ||
|
||
### swaggerProject | ||
|
||
- (string): What should the project created to hold the swagger files be called? | ||
|
||
### target | ||
|
||
- (string): What should the project be called? |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.