We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
2.1.2
openapi: "3.0.0" info: version: 1.0.0 title: 0001_allOffProps paths: /sample_resource: post: operationId: createResOne requestBody: content: application/json: schema: $ref: "#/components/schemas/create_res_one" responses: '201': description: Ok content: application/json: schema: $ref: "#/components/schemas/standard_response_res_one" components: schemas: standard_response_result: properties: result: type: object properties: status: type: boolean http_code: type: integer errors: type: array items: $ref: '#/components/schemas/standard_error' info: type: string trace_id: type: string num_elements: type: integer required: - status - http_code - trace_id standard_error: type: object properties: code: type: integer message: type: string standard_response_res_one: type: object allOf: - $ref: '#/components/schemas/standard_response_result' properties: data: properties: name: type: string create_res_one: type: object properties: name: type: string
ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolveFully(true); OpenAPI openAPI = new OpenAPIV3Parser().read("api.yaml" + fileName, null, parseOptions);
The schema standard_response_res_one has 2 properties: data and result
standard_response_res_one
data
result
The schema standard_response_res_one only has the result property
After debugging the issue seems that in the class ResolverFully we need to add the properties of the composedSchema to the result schema (https://github.com/swagger-api/swagger-parser/blob/master/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/util/ResolverFully.java#L405)
ResolverFully
The text was updated successfully, but these errors were encountered:
Extend resolve fully and solve issues swagger-api#1777 and swagger-ap…
d7fa4ab
…i#1802
Merge pull request #1823 from devdevx/issues-1777-1802
19f7529
Extend resolve fully and solve issues #1777 and #1802
gracekarina
No branches or pull requests
Parser version:
2.1.2
Spec:
Code:
Expected result:
The schema
standard_response_res_one
has 2 properties:data
andresult
Current result:
The schema
standard_response_res_one
only has theresult
propertyInvestigation about the issue cause:
After debugging the issue seems that in the class
ResolverFully
we need to add the properties of the composedSchema to the result schema (https://github.com/swagger-api/swagger-parser/blob/master/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/util/ResolverFully.java#L405)The text was updated successfully, but these errors were encountered: