Swashbuckle.OData | Extends Swashbuckle with OData v4 support | REST library
kandi X-RAY | Swashbuckle.OData Summary
kandi X-RAY | Swashbuckle.OData Summary
| :mega: Calling for Maintainers | |--------------| | Because OData WebApi does not support ASP.NET Core (see and I am 100% focused on new ASP.NET Core development, I don’t have the capacity to maintain this project. Still, I’d love to see it live on and am seeking one or two "core" contributors / maintainers. Ideally, these would be people who have already contributed through PRs and understand the inner workings and overall design. If you’re interested, please let me know by adding a comment [here] Thank you! |.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Swashbuckle.OData
Swashbuckle.OData Key Features
Swashbuckle.OData Examples and Code Snippets
Community Discussions
Trending Discussions on Swashbuckle.OData
QUESTION
I have an ASP.Net Web API 2 endpoint that supports OData queries. It is as such:
...ANSWER
Answered 2017-Apr-17 at 14:48It turns out it's pretty easy to add whatever parameters you want to Swagger using SwashBuckle using an IOperationFilter
. You can add it in your Swagger Configuration using c.OperationFilter();
. I created one that adds some OData Parameters to all IQueryable endpoints in my API:
QUESTION
I have Swashbuckle.OData working with OData (4.0) in an Web Api project.
It's all working fine, but when I change the 'Entity Set' name in the OData config, the OData controller no longer shows up in the swagger JSON file, and consequently the Swagger UI.
This works: builder.EntitySet("AccountRecords"); This does not work: builder.EntitySet("Records");
Is there something I am doing wrong or missing? How do I 'tell' Swashbuckle.OData that the name is different?
...ANSWER
Answered 2017-Jul-27 at 11:51The name of the controller and EntitySet
should match. For your AccountRecords
you should have a AccountRecordsController
(which I guess you have) and if you rename the entity to Records
the controller name should be RecordsController
.
This is not a Swashbuckle/Swagger problem but WebAPI naming convention.
I wonder if your API actually works if the names don't match.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Swashbuckle.OData
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page