Adding custom operations
See original GitHub issueI’m trying to add Owin OAuth authorization server’s token endpoint to the swagger api docs, but Swashbuckle can only read operations from the IApiExplorer. Owin uses a custom middleware to create the OAuth token endpoint with app.UseOAuthAuthorizationServer(options) call, so it won’t appear on the IApiExplorer.
I need something like this:
swaggerConfig.operations.Add(new Operation() {
operationId = "auth/token",
consumes = new List<string>
{
"application/x-www-form-urlencoded"
},
parameters = new List<Parameter> {
new Parameter
{
type = "string",
name = "grant_type",
required = true,
@in = "formData"
},
new Parameter
{
type = "string",
name = "username",
required = false,
@in = "formData"
},
new Parameter
{
type = "string",
name = "password",
required = false,
@in = "formData"
}
}
});
How could I manually add custom operations to the docs?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Custom operators | onnxruntime
Custom operators can be defined in a separate shared library (e.g., a .dll on Windows or a .so on Linux). A custom operator...
Read more >Creating Custom Operations
You use this procedure to define custom operations in order to perform operations on instances or hosts based on these definitions.
Read more >Adding custom operations with hook_entity_operation()
I'm trying to add a custom entity operation to taxonomy terms of a specific vocabulary. I've found documentation on using hook_entity_operation ...
Read more >How to Create Custom Operations and Custom Hooks
In this post you will learn what custom operations and custom hooks are and what you can do with them. You will also...
Read more >Operation Guide: How to Use Custom Operations
This custom operation allows you to add any/all applicable course permission tags to a user with a single action. Learn more about how...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you!
I was able to add the custom operation like this:
Hey Is it possible to make a custom operation with raw URL input? I need it to document some OData endpoints.
For example:
/odata/People?$select=Id,Name&$expand=Passport($select=IDNP)