sensenet
sensenet copied to clipboard
Infer OpenApi parts from Method Based Operations
Generate OpenaApi elements from OData action/function methods.
- Use the base OpenApi document that defines metadata and elementary CRUD operations.
- Use references for complex parameters and response objects.
- Take care of object inheritances.
- Do not generate descriptions. Processing documentation will be a future issue.
- Overloads can be problematic: only parameter differences cannot be generated for OpenApi.
- Categorize operations by an attribute (e.g.
[CategoryAttribute("ContentOperation")]). The codedoc element///<SnCategory>is the wrong solution. - Avoid empty object definitions in schemas. Generate new issues if needed.
- Normalize responses. For example, do not return HTTP 500 in case of a well-known error. Generate new issues if needed.