openBackhaul / ApplicationPattern

Pattern for REST servers
Apache License 2.0
6 stars 16 forks source link

OAS : getGenericResponseProfileValue needs to move the example #536

Closed ManasaBM1 closed 1 year ago

ManasaBM1 commented 1 year ago

In OAS , currently , when response code is 200 , the example for getGenericResponseProfileValue response is present as mentioned below. But as per specification, it is expected to be an object

gen

where example is specified as an attribute for the property of response-profile-1-0:value: that is "value-reference" or "static-value"

Problem :

For implementation we generate server side stub by following steps that are mentioned in the below mentioned link https://github.com/openBackhaul/ApplicationPattern/blob/develop/doc/ImplementingApplications/Steps2GenerateServerStub/Steps2GenerateServerStub.md . While generating server side stub the swagger editor generated the example as string because it is declared as an example for the property of response-profile-1-0:value that is "value-reference" or "static-value" which are of type string. Please find the snapshot of example generated :

gen2

Proposal : To specify the example for the response when response code is 200 as mentioned below :

gen2

openBackhaul commented 1 year ago

Changed as proposed.

openBackhaul commented 1 year ago

Pull-request #539 merged.