-
Notifications
You must be signed in to change notification settings - Fork 4
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
Annotating the GET /entity
(ie GetCollection) query for a resource that extends %pkg.isc.rest.model.resource
#14
Comments
Looks like this has been considered: isc-rest/cls/_pkg/isc/rest/openAPI.cls Lines 1027 to 1043 in 7d2b13f
We might go ahead and add the documentation in here /// Modify the autogenerated OpenAPI Specification objects for this class by changing the values of the passed ByRef parameters
/// @Argument schemas: List of %pkg.isc.rest.openAPI.model.schema
/// @Argument endpoints: Array of endpoint URL -> %pkg.isc.rest.openAPI.model.pathItem (%pkg.isc.rest.openAPI.model.paths)
/// Sample use cases:
/// - Modify resource schema descriptions
/// - Add additional ISC_* fields to the resource schemas
/// - Correct resource schemas for classes that use custom JSON generation code
/// - Remove non-desired endpoints from output
/// - Provide alternate schemas for endpoint input / output (ie. in the case of %DynamicObject use)
/// - Add documentation for non-standard endpoints
/// Note: Endpoints can be removed from the endpoints array as desired, however schemas should not be removed from the schemas array.
ClassMethod ModifyOpenAPIInfo(ByRef schemas As %ListOfObjects, ByRef endpoints As %pkg.isc.rest.openAPI.model.paths) [ Abstract ]
{
} This might be harder than it sounds by why not have an optional XDATA block that allows you to document query parameters as you would in a custom action? |
I think the ideal solution here would be to have "Schemas" and "Endpoints" XData blocks (containing JSON, not XML, obviously ;)) that end up getting merged in to the OpenAPI document. The default implementation of ModifyOpenAPIInfo could be updated to check for these. @isc-pbarton @isc-kiyer would you agree? |
@isc-tleavitt That sounds reasonable to me |
Yes agreed on my end. Specifying JSON that gets merged into the document will be simpler and more transparent than overriding the ModifyOpenAPIInfo method. |
Brought inside (internal reference: APPS-13700) |
Hi, we have defined a resource that extends
%pkg.isc.rest.model.resource
. We have our own custom query parameters that our resource uses inWe need to document this method so that we can describe the set of valid query parameters.
How can we document this method so that the Open API generator will produce this custom documentation?
Can we create an action map whose name is null?
The text was updated successfully, but these errors were encountered: