-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose properties of resource #142
Expose properties of resource #142
Conversation
I'm not entirely sure why this would help with #140, since I've never used Swashbuckle before. I'm generally pretty hesitant to making things public, but I'm assuming you have a specific use in mind for this API. Can you maybe explain with a code snippet or whatever? |
I don't have a good code snippet to show but I hope I can explain the purpose better without requiring previous knowledge. So Swashbuckle works by introspecting the Web API controllers, to generate a swagger document which essentially is a schema/documentation of the REST API. The built in introspection in Swashbuckle will only see the type as returned by an However, I can provide code to customize the introspection. In that code I can find the actual For now I only have a hacked solution for the actual customization logic but I think that I will eventually be able to provide an extension to Swashbuckle that can easily be used in any Saule project. This would be similar to https://github.com/rbeauchamp/Swashbuckle.OData which provides something similar but for OData. |
Ok, that sounds good. I'll merge this if you can rebase on |
Needed for external inspection to for example generate schema.
Rebased. I've also added a property |
Since people can pass any string to this constructor (through Of course if we do that, it should be called something like Does this make sense to you? Am I correctly understanding the purpose of this new property? |
Yes I think it would make sense, but it would also break existing public API? |
Ah no, I misread you and now it makes even more sense. I'll try to make the changes as suggested. |
@joukevandermaas I hope this is good to go now. |
Yup! thanks for seeing this through! |
Needed for external inspection to for example generate schema.
Can solve part of #140.