Skip to content
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

handle multi schemaValidation for one request #685

Open
shahinshirvani opened this issue Jan 26, 2025 · 3 comments
Open

handle multi schemaValidation for one request #685

shahinshirvani opened this issue Jan 26, 2025 · 3 comments
Assignees
Labels
investigate Needs more investigation, before next steps can be defined.

Comments

@shahinshirvani
Copy link

shahinshirvani commented Jan 26, 2025

I have an openapi.json file which includes a multi-schema response for a request like this:

"responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountResultDto"
                },
                "examples": {
                  "example-1": {
                    "summary": "Status 200.",
                    "description": "GET `/authorization/count?userIdIn=jonny1,jonny2`",
                    "value": {
                      "count": 2
                    }
                  }
                }
              }
            },
            "description": "Request successful."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExceptionDto"
                }
              }
            },
            "description": "Returned if some of the query parameters are invalid, for example if a `sortOrder`\r\nparameter is supplied, but no `sortBy` is specified. See the\r\n[Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling)\r\nfor the error response format."
          }
        }

I can get the first schema in the post-response to a request from the postman when I use this:

      {
        "openApiOperation": "*::/*",
        "schemaValidation": {
          "enabled": true
        }
      }

How can you get all of them? For example, in this scenario, get response 200 and 400 schema validation

@thim81
Copy link
Collaborator

thim81 commented Jan 31, 2025

hi @shahinshirvani

Let me do some trials, since If I'm not mistaken it would be possible.
I'll keep you posted.

@thim81 thim81 self-assigned this Jan 31, 2025
@thim81 thim81 added the investigate Needs more investigation, before next steps can be defined. label Jan 31, 2025
@shahinshirvani
Copy link
Author

@thim81 I appreciate your time and will wait for your response

@shahinshirvani
Copy link
Author

Hi @thim81
Do you have any update about this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate Needs more investigation, before next steps can be defined.
Projects
None yet
Development

No branches or pull requests

2 participants