You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I get the same problem as #437 but for example in RequestBody
To Reproduce
Steps to reproduce the behavior:
Have an operation with a complex object in parameter to be specified in JSON:
public ResponseEntity<CommissionDto> updateCommission(
@Parameter(description = "Security account number to update the Commission", required = true) @PathVariable("id") @Size(min = SecuritiesAccount.SECURITY_ACCOUNT_ID_SIZE, max = SecuritiesAccount.SECURITY_ACCOUNT_ID_SIZE) @Valid String id,
@io.swagger.v3.oas.annotations.parameters.RequestBody(description = "A Security account's commission rates to update", required = true, content = @Content(schema = @Schema(implementation = CommissionDto.class), examples = @ExampleObject(name = "requestBodyExample", ref = PUT_COMMISSION_REQUEST_BODY_EXAMPLE_KEY))) @RequestBody(required = true) @Valid CommissionDto commission
){
...
}
Expected behavior
I expect to have a valid openapi.yaml, i.e. without description field in example which give a warning when using https://editor.swagger.io/:
paths:
'/api/v1/commissions/{id}':
put:
tags:
- commissions-resource
summary: Updates the security account's commission details into Base tiers repository
description: updateCommission
operationId: updateCommission
parameters:
- name: id
in: path
description: Security account number to update the Commission
required: true
schema:
maxLength: 21
minLength: 21
type: string
requestBody:
description: A Security account's commission rates to update
content:
application/json:
schema:
$ref: '#/components/schemas/Commission'
examples:
requestBodyExample:
description: requestBodyExample
$ref: '#/components/examples/httpPutCommissionRequestBodyExample'
Could we have a similar fix than in 437 issue?
Thanks in advance.
The text was updated successfully, but these errors were encountered:
You sample, is referencing many missing objects...
Remove the name of the ExampleObject, if you want use ref instead. @ExampleObject(ref = PUT_COMMISSION_REQUEST_BODY_EXAMPLE_KEY)
swagger-core, sets the description of the example with it's name if present.
Describe the bug
I get the same problem as #437 but for example in RequestBody
To Reproduce
Steps to reproduce the behavior:
Have an operation with a complex object in parameter to be specified in JSON:
Expected behavior
I expect to have a valid openapi.yaml, i.e. without description field in example which give a warning when using https://editor.swagger.io/:
Could we have a similar fix than in 437 issue?
Thanks in advance.
The text was updated successfully, but these errors were encountered: