You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just ran into a case where an openapi spec had a lot of "required" properties in the request model, however, the software offering the API did not comply to this themselves, causing our requests to fail.
I would like to be able to override generation of required properties so that "required" is added to the description instead of as a qualifier.
The text was updated successfully, but these errors were encountered:
I also experienced this kind of error due to a specification that did not match with the API.
If the specification specifies "required", we have to generate a required property.
But yes, it could be an option for the generation.
I just change something in model generation to do this, result example :
/// /// * This property is required.PropertyidAs%String(MAXLEN = "");/// A map containing service references and/or endpoints./// * This property is required.PropertyserviceEndpointAsNuts.Api.DidManager.model.CompoundServiceserviceEndpoint;/// type of the endpoint. May be freely chosen./// * This property is required.PropertytypeAs%String(MAXLEN = "");
To change the behavior, we have to set the features:
setfeatures("model.property.norequired")=1
Please change the entry point:
set sc = ##class(dc.openapi.client.Spec).generateApp(packageName, url, .features, externals)
; to
Set sc = ##class(dc.openapi.suite.Generate).ProductionClient(packageName, url, .features, externals)
generateApp won't work with "model.property.norequired" and I would like to gather all entry generation point in the class dc.openapi.suite.Generate.
I just ran into a case where an openapi spec had a lot of "required" properties in the request model, however, the software offering the API did not comply to this themselves, causing our requests to fail.
I would like to be able to override generation of required properties so that "required" is added to the description instead of as a qualifier.
The text was updated successfully, but these errors were encountered: