getsandbox / worker-cli

Sandbox Worker is the core processing component of the Sandbox product
https://getsandbox.com
230 stars 62 forks source link

Sandbox is not saving response examples in .liquid templates #33

Closed shobero closed 6 years ago

shobero commented 6 years ago

I have response examples defined as below for in open API spec 200: description: OK examples: application/json: "firstName": "testA" "lastName": "testB" "email": "testuser@test.com" "password": "test123" "phoneNumber" : "(121) 212-1212" "extension" : "222" But when this doc is imported in sandbox, response is not displayed in templates (.liquid)

nhoughto commented 6 years ago

Could you attach your import definition?

shobero commented 6 years ago

Could you attach your import definition?

middleware_ciam.json.zip Please find the attached definition.

nhoughto commented 6 years ago

So your response objects defined in the schema don't have examples (only some requests have examples), and the json schema defined for the response has a type of 'object', which means no schema effectively.

        "responses" : {
          "204" : {
            "description" : "Password successfully updated",
            "schema" : {
              "type" : "object"
            }
          },

You either need to define an example for the response(s) or define a proper json schema for the generated responses to function.