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

Resolve fully does not resolve composed schemas or requestBodies schemas with options.setResolve(true); options.setResolveFully(true); options.setResolveCombinators(true) #2101

Open
karasuno7 opened this issue May 13, 2024 · 0 comments

Comments

@karasuno7
Copy link

openapi: 3.0.0
info:
  title: Example API
  version: 1.0.0
paths:
  /example/{id}:
    parameters:
      - $ref: '#/components/parameters/ExampleParam'
    get:
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExampleSchema'
  /example2:
    post:
      requestBody:
        $ref: '#/components/requestBodies/ExampleBody'
      responses:
        '201':
          description: Resource created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
components:
  parameters:
    ExampleParam:
      name: id
      in: path
      description: ID parameter in the path
      required: true
      schema:
        type: integer
  requestBodies:
    ExampleBody:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ExampleRequestBody'
  responses:
    ExampleResponse:
      description: Example response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ExampleResponse'
  schemas:
    ExampleSchema:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
    ExampleRequestBody:
      type: object
      properties:
        username:
          type: string
        password:
          type: string
    ExampleResponse:
      type: object
      properties:
        message:
          type: string
          
          

returns:

{ "openapi" : "3.0.0", "info" : { "title" : "Example API", "description" : null, "termsOfService" : null, "contact" : null, "license" : null, "version" : "1.0.0", "extensions" : null }, "externalDocs" : null, "servers" : [ { "url" : "/", "description" : null, "variables" : null, "extensions" : null } ], "security" : null, "tags" : null, "paths" : { "/example/{id}" : { "summary" : null, "description" : null, "get" : { "tags" : null, "summary" : null, "description" : null, "externalDocs" : null, "operationId" : null, "parameters" : [ { "name" : "id", "in" : "path", "description" : "ID parameter in the path", "required" : true, "deprecated" : null, "allowEmptyValue" : null, "$ref" : null, "style" : "SIMPLE", "explode" : false, "allowReserved" : null, "schema" : { "title" : null, "multipleOf" : null, "maximum" : null, "exclusiveMaximum" : null, "minimum" : null, "exclusiveMinimum" : null, "maxLength" : null, "minLength" : null, "pattern" : null, "maxItems" : null, "minItems" : null, "uniqueItems" : null, "maxProperties" : null, "minProperties" : null, "required" : null, "type" : "integer", "not" : null, "properties" : null, "additionalProperties" : null, "description" : null, "format" : "int32", "$ref" : null, "nullable" : null, "readOnly" : null, "writeOnly" : null, "example" : null, "externalDocs" : null, "deprecated" : null, "xml" : null, "extensions" : null, "discriminator" : null, "default" : null, "enum" : null }, "examples" : null, "example" : null, "content" : null, "extensions" : null } ], "requestBody" : null, "responses" : { "200" : { "description" : "Successful response", "headers" : null, "content" : { "application/json" : { "schema" : { "title" : null, "multipleOf" : null, "maximum" : null, "exclusiveMaximum" : null, "minimum" : null, "exclusiveMinimum" : null, "maxLength" : null, "minLength" : null, "pattern" : null, "maxItems" : null, "minItems" : null, "uniqueItems" : null, "maxProperties" : null, "minProperties" : null, "required" : null, "type" : "object", "not" : null, "properties" : { "id" : { "title" : null, "multipleOf" : null, "maximum" : null, "exclusiveMaximum" : null, "minimum" : null, "exclusiveMinimum" : null, "maxLength" : null, "minLength" : null, "pattern" : null, "maxItems" : null, "minItems" : null, "uniqueItems" : null, "maxProperties" : null, "minProperties" : null, "required" : null, "type" : "integer", "not" : null, "properties" : null, "additionalProperties" : null, "description" : null, "format" : "int32", "$ref" : null, "nullable" : null, "readOnly" : null, "writeOnly" : null, "example" : null, "externalDocs" : null, "deprecated" : null, "xml" : null, "extensions" : null, "discriminator" : null, "default" : null, "enum" : null }, "name" : { "title" : null, "multipleOf" : null, "maximum" : null, "exclusiveMaximum" : null, "minimum" : null, "exclusiveMinimum" : null, "maxLength" : null, "minLength" : null, "pattern" : null, "maxItems" : null, "minItems" : null, "uniqueItems" : null, "maxProperties" : null, "minProperties" : null, "required" : null, "type" : "string", "not" : null, "properties" : null, "additionalProperties" : null, "description" : null, "format" : null, "$ref" : null, "nullable" : null, "readOnly" : null, "writeOnly" : null, "example" : null, "externalDocs" : null, "deprecated" : null, "xml" : null, "extensions" : null, "discriminator" : null, "default" : null, "enum" : null } }, "additionalProperties" : null, "description" : null, "format" : null, "$ref" : null, "nullable" : null, "readOnly" : null, "writeOnly" : null, "example" : null, "externalDocs" : null, "deprecated" : null, "xml" : null, "extensions" : null, "discriminator" : null, "default" : null, "enum" : null }, "examples" : null, "example" : null, "encoding" : null, "extensions" : null } }, "links" : null, "extensions" : null, "$ref" : null } }, "callbacks" : null, "deprecated" : null, "security" : null, "servers" : null, "extensions" : null }, "put" : null, "post" : null, "delete" : null, "options" : null, "head" : null, "patch" : null, "trace" : null, "servers" : null, "parameters" : null, "$ref" : null, "extensions" : null }, "/example2" : { "summary" : null, "description" : null, "get" : null, "put" : null, "post" : { "tags" : null, "summary" : null, "description" : null, "externalDocs" : null, "operationId" : null, "parameters" : null, "requestBody" : { "description" : null, "content" : null, "required" : null, "extensions" : null, "$ref" : "#/components/requestBodies/ExampleBody" }, "responses" : { "201" : { "description" : "Resource created successfully", "headers" : null, "content" : { "application/json" : { "schema" : { "title" : null, "multipleOf" : null, "maximum" : null, "exclusiveMaximum" : null, "minimum" : null, "exclusiveMinimum" : null, "maxLength" : null, "minLength" : null, "pattern" : null, "maxItems" : null, "minItems" : null, "uniqueItems" : null, "maxProperties" : null, "minProperties" : null, "required" : null, "type" : "object", "not" : null, "properties" : { "message" : { "title" : null, "multipleOf" : null, "maximum" : null, "exclusiveMaximum" : null, "minimum" : null, "exclusiveMinimum" : null, "maxLength" : null, "minLength" : null, "pattern" : null, "maxItems" : null, "minItems" : null, "uniqueItems" : null, "maxProperties" : null, "minProperties" : null, "required" : null, "type" : "string", "not" : null, "properties" : null, "additionalProperties" : null, "description" : null, "format" : null, "$ref" : null, "nullable" : null, "readOnly" : null, "writeOnly" : null, "example" : null, "externalDocs" : null, "deprecated" : null, "xml" : null, "extensions" : null, "discriminator" : null, "default" : null, "enum" : null } }, "additionalProperties" : null, "description" : null, "format" : null, "$ref" : null, "nullable" : null, "readOnly" : null, "writeOnly" : null, "example" : null, "externalDocs" : null, "deprecated" : null, "xml" : null, "extensions" : null, "discriminator" : null, "default" : null, "enum" : null }, "examples" : null, "example" : null, "encoding" : null, "extensions" : null } }, "links" : null, "extensions" : null, "$ref" : null } }, "callbacks" : null, "deprecated" : null, "security" : null, "servers" : null, "extensions" : null }, "delete" : null, "options" : null, "head" : null, "patch" : null, "trace" : null, "servers" : null, "parameters" : null, "$ref" : null, "extensions" : null } }, "components" : { "schemas" : { "ExampleSchema" : { "title" : null, "multipleOf" : null, "maximum" : null, "exclusiveMaximum" : null, "minimum" : null, "exclusiveMinimum" : null, "maxLength" : null, "minLength" : null, "pattern" : null, "maxItems" : null, "minItems" : null, "uniqueItems" : null, "maxProperties" : null, "minProperties" : null, "required" : null, "type" : "object", "not" : null, "properties" : { "id" : { "title" : null, "multipleOf" : null, "maximum" : null, "exclusiveMaximum" : null, "minimum" : null, "exclusiveMinimum" : null, "maxLength" : null, "minLength" : null, "pattern" : null, "maxItems" : null, "minItems" : null, "uniqueItems" : null, "maxProperties" : null, "minProperties" : null, "required" : null, "type" : "integer", "not" : null, "properties" : null, "additionalProperties" : null, "description" : null, "format" : "int32", "$ref" : null, "nullable" : null, "readOnly" : null, "writeOnly" : null, "example" : null, "externalDocs" : null, "deprecated" : null, "xml" : null, "extensions" : null, "discriminator" : null, "default" : null, "enum" : null }, "name" : { "title" : null, "multipleOf" : null, "maximum" : null, "exclusiveMaximum" : null, "minimum" : null, "exclusiveMinimum" : null, "maxLength" : null, "minLength" : null, "pattern" : null, "maxItems" : null, "minItems" : null, "uniqueItems" : null, "maxProperties" : null, "minProperties" : null, "required" : null, "type" : "string", "not" : null, "properties" : null, "additionalProperties" : null, "description" : null, "format" : null, "$ref" : null, "nullable" : null, "readOnly" : null, "writeOnly" : null, "example" : null, "externalDocs" : null, "deprecated" : null, "xml" : null, "extensions" : null, "discriminator" : null, "default" : null, "enum" : null } }, "additionalProperties" : null, "description" : null, "format" : null, "$ref" : null, "nullable" : null, "readOnly" : null, "writeOnly" : null, "example" : null, "externalDocs" : null, "deprecated" : null, "xml" : null, "extensions" : null, "discriminator" : null, "default" : null, "enum" : null }, "ExampleRequestBody" : { "title" : null, "multipleOf" : null, "maximum" : null, "exclusiveMaximum" : null, "minimum" : null, "exclusiveMinimum" : null, "maxLength" : null, "minLength" : null, "pattern" : null, "maxItems" : null, "minItems" : null, "uniqueItems" : null, "maxProperties" : null, "minProperties" : null, "required" : null, "type" : "object", "not" : null, "properties" : { "username" : { "title" : null, "multipleOf" : null, "maximum" : null, "exclusiveMaximum" : null, "minimum" : null, "exclusiveMinimum" : null, "maxLength" : null, "minLength" : null, "pattern" : null, "maxItems" : null, "minItems" : null, "uniqueItems" : null, "maxProperties" : null, "minProperties" : null, "required" : null, "type" : "string", "not" : null, "properties" : null, "additionalProperties" : null, "description" : null, "format" : null, "$ref" : null, "nullable" : null, "readOnly" : null, "writeOnly" : null, "example" : null, "externalDocs" : null, "deprecated" : null, "xml" : null, "extensions" : null, "discriminator" : null, "default" : null, "enum" : null }, "password" : { "title" : null, "multipleOf" : null, "maximum" : null, "exclusiveMaximum" : null, "minimum" : null, "exclusiveMinimum" : null, "maxLength" : null, "minLength" : null, "pattern" : null, "maxItems" : null, "minItems" : null, "uniqueItems" : null, "maxProperties" : null, "minProperties" : null, "required" : null, "type" : "string", "not" : null, "properties" : null, "additionalProperties" : null, "description" : null, "format" : null, "$ref" : null, "nullable" : null, "readOnly" : null, "writeOnly" : null, "example" : null, "externalDocs" : null, "deprecated" : null, "xml" : null, "extensions" : null, "discriminator" : null, "default" : null, "enum" : null } }, "additionalProperties" : null, "description" : null, "format" : null, "$ref" : null, "nullable" : null, "readOnly" : null, "writeOnly" : null, "example" : null, "externalDocs" : null, "deprecated" : null, "xml" : null, "extensions" : null, "discriminator" : null, "default" : null, "enum" : null }, "ExampleResponse" : { "title" : null, "multipleOf" : null, "maximum" : null, "exclusiveMaximum" : null, "minimum" : null, "exclusiveMinimum" : null, "maxLength" : null, "minLength" : null, "pattern" : null, "maxItems" : null, "minItems" : null, "uniqueItems" : null, "maxProperties" : null, "minProperties" : null, "required" : null, "type" : "object", "not" : null, "properties" : { "message" : { "title" : null, "multipleOf" : null, "maximum" : null, "exclusiveMaximum" : null, "minimum" : null, "exclusiveMinimum" : null, "maxLength" : null, "minLength" : null, "pattern" : null, "maxItems" : null, "minItems" : null, "uniqueItems" : null, "maxProperties" : null, "minProperties" : null, "required" : null, "type" : "string", "not" : null, "properties" : null, "additionalProperties" : null, "description" : null, "format" : null, "$ref" : null, "nullable" : null, "readOnly" : null, "writeOnly" : null, "example" : null, "externalDocs" : null, "deprecated" : null, "xml" : null, "extensions" : null, "discriminator" : null, "default" : null, "enum" : null } }, "additionalProperties" : null, "description" : null, "format" : null, "$ref" : null, "nullable" : null, "readOnly" : null, "writeOnly" : null, "example" : null, "externalDocs" : null, "deprecated" : null, "xml" : null, "extensions" : null, "discriminator" : null, "default" : null, "enum" : null } }, "responses" : { "ExampleResponse" : { "description" : "Example response", "headers" : null, "content" : { "application/json" : { "schema" : { "title" : null, "multipleOf" : null, "maximum" : null, "exclusiveMaximum" : null, "minimum" : null, "exclusiveMinimum" : null, "maxLength" : null, "minLength" : null, "pattern" : null, "maxItems" : null, "minItems" : null, "uniqueItems" : null, "maxProperties" : null, "minProperties" : null, "required" : null, "type" : null, "not" : null, "properties" : null, "additionalProperties" : null, "description" : null, "format" : null, "$ref" : "#/components/schemas/ExampleResponse", "nullable" : null, "readOnly" : null, "writeOnly" : null, "example" : null, "externalDocs" : null, "deprecated" : null, "xml" : null, "extensions" : null, "discriminator" : null, "default" : null, "enum" : null }, "examples" : null, "example" : null, "encoding" : null, "extensions" : null } }, "links" : null, "extensions" : null, "$ref" : null } }, "parameters" : { "ExampleParam" : { "name" : "id", "in" : "path", "description" : "ID parameter in the path", "required" : true, "deprecated" : null, "allowEmptyValue" : null, "$ref" : null, "style" : "SIMPLE", "explode" : false, "allowReserved" : null, "schema" : { "title" : null, "multipleOf" : null, "maximum" : null, "exclusiveMaximum" : null, "minimum" : null, "exclusiveMinimum" : null, "maxLength" : null, "minLength" : null, "pattern" : null, "maxItems" : null, "minItems" : null, "uniqueItems" : null, "maxProperties" : null, "minProperties" : null, "required" : null, "type" : "integer", "not" : null, "properties" : null, "additionalProperties" : null, "description" : null, "format" : "int32", "$ref" : null, "nullable" : null, "readOnly" : null, "writeOnly" : null, "example" : null, "externalDocs" : null, "deprecated" : null, "xml" : null, "extensions" : null, "discriminator" : null, "default" : null, "enum" : null }, "examples" : null, "example" : null, "content" : null, "extensions" : null } }, "examples" : null, "requestBodies" : { "ExampleBody" : { "description" : null, "content" : { "application/json" : { "schema" : { "title" : null, "multipleOf" : null, "maximum" : null, "exclusiveMaximum" : null, "minimum" : null, "exclusiveMinimum" : null, "maxLength" : null, "minLength" : null, "pattern" : null, "maxItems" : null, "minItems" : null, "uniqueItems" : null, "maxProperties" : null, "minProperties" : null, "required" : null, "type" : "object", "not" : null, "properties" : { "username" : { "title" : null, "multipleOf" : null, "maximum" : null, "exclusiveMaximum" : null, "minimum" : null, "exclusiveMinimum" : null, "maxLength" : null, "minLength" : null, "pattern" : null, "maxItems" : null, "minItems" : null, "uniqueItems" : null, "maxProperties" : null, "minProperties" : null, "required" : null, "type" : "string", "not" : null, "properties" : null, "additionalProperties" : null, "description" : null, "format" : null, "$ref" : null, "nullable" : null, "readOnly" : null, "writeOnly" : null, "example" : null, "externalDocs" : null, "deprecated" : null, "xml" : null, "extensions" : null, "discriminator" : null, "default" : null, "enum" : null }, "password" : { "title" : null, "multipleOf" : null, "maximum" : null, "exclusiveMaximum" : null, "minimum" : null, "exclusiveMinimum" : null, "maxLength" : null, "minLength" : null, "pattern" : null, "maxItems" : null, "minItems" : null, "uniqueItems" : null, "maxProperties" : null, "minProperties" : null, "required" : null, "type" : "string", "not" : null, "properties" : null, "additionalProperties" : null, "description" : null, "format" : null, "$ref" : null, "nullable" : null, "readOnly" : null, "writeOnly" : null, "example" : null, "externalDocs" : null, "deprecated" : null, "xml" : null, "extensions" : null, "discriminator" : null, "default" : null, "enum" : null } }, "additionalProperties" : null, "description" : null, "format" : null, "$ref" : null, "nullable" : null, "readOnly" : null, "writeOnly" : null, "example" : null, "externalDocs" : null, "deprecated" : null, "xml" : null, "extensions" : null, "discriminator" : null, "default" : null, "enum" : null }, "examples" : null, "example" : null, "encoding" : null, "extensions" : null } }, "required" : null, "extensions" : null, "$ref" : null } }, "headers" : null, "securitySchemes" : null, "links" : null, "callbacks" : null, "extensions" : { } }, "extensions" : null }

Is this expected?

@karasuno7 karasuno7 changed the title Resolve fully does not resolve composed schemas or requestBodies schemas Resolve fully does not resolve composed schemas or requestBodies schemas with options.setResolve(true); options.setResolveFully(true); options.setResolveCombinators(true) May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant