Using <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/master/doc/WebSite/OData-AspNetCore-Integration.md">https://github.com/aspnetboilerplate/as ... gration.md</a>, I was able to get OData endpoints up, but how can I get a Swagger/OAI doc for it? Any sample codes or guidance?
Also, when I try to get the $metadata, it doesn't show much: {"result": {"schemaElements": [{"declaredKey": [{"defaultValueString":null,"propertyKind":1,"type":{"isNullable":false,"definition":{"name":"Int32","namespace":"Edm","typeKind":1,"primitiveKind":9,"schemaElementKind":1,"fullName":"Edm.Int32"}}
3 Answer(s)
-
0
I was able to get OData endpoints up, but how can I get a Swagger/OAI doc for it? Any sample codes or guidance?
Try adding [RemoteService] attribute to your controller.
Also, when I try to get the $metadata, it doesn't show much
Answered in this SO question: <a class="postlink" href="https://stackoverflow.com/a/49559626/8601760">https://stackoverflow.com/a/49559626/8601760</a>
-
0
Thanks Aaron, the 2nd part seems to show the $metadata correctly now.
However, for the 1st part, I believe still not working. I added the [RemoteService] attribute to an OData controller in my Web.Core project, but don't see any differences. Where is the OData Swagger supposed to show up? Along with the main Swagger doc/ui? Not sure I want it to be in the same doc in the future yet. but that's where I'm looking. Not sure how this is all connected yet. Thanks.
... [RemoteService] public class CodeLanguagesController : AbpODataEntityController<CodeLanguage>, ITransientDependency { ...
-
0
Try adding [Route] attribute to your method.