@@ -130,7 +130,7 @@ public OpenApiSchemaArtifact apply( final Aspect aspect, final OpenApiSchemaGene
130
130
final ObjectNode rootNode = getRootJsonNode ( config .generateCommentForSeeAttributes () );
131
131
final String apiVersion = getApiVersion ( aspect , config .useSemanticVersion () );
132
132
133
- ((ObjectNode ) rootNode .get ( "info" ))
133
+ ( (ObjectNode ) rootNode .get ( "info" ) )
134
134
.put ( "title" , aspect .getPreferredName ( config .locale () ) )
135
135
.put ( "version" , apiVersion )
136
136
.put ( AbstractGenerator .SAMM_EXTENSION , aspect .urn ().toString () );
@@ -243,7 +243,7 @@ private String getApiVersion( final Aspect aspect, final boolean useSemanticVers
243
243
private void setResponseBodies ( final Aspect aspect , final ObjectNode jsonNode , final boolean includePaging ) {
244
244
final ObjectNode componentsResponseNode = (ObjectNode ) jsonNode .get ( FIELD_COMPONENTS ).get ( FIELD_RESPONSES );
245
245
final ObjectNode referenceNode = FACTORY .objectNode ()
246
- .put ( REF , COMPONENTS_SCHEMAS + (includePaging ? FIELD_PAGING_SCHEMA : aspect .getName ()) );
246
+ .put ( REF , COMPONENTS_SCHEMAS + ( includePaging ? FIELD_PAGING_SCHEMA : aspect .getName () ) );
247
247
final ObjectNode contentNode = getApplicationNode ( referenceNode );
248
248
componentsResponseNode .set ( aspect .getName (), contentNode );
249
249
contentNode .put ( FIELD_DESCRIPTION , "The request was successful." );
@@ -497,7 +497,7 @@ private ObjectNode getRequestEndpointsUpdate( final Aspect aspect, final ObjectN
497
497
final boolean isPut ) {
498
498
final ObjectNode objectNode = FACTORY .objectNode ();
499
499
objectNode .set ( "tags" , FACTORY .arrayNode ().add ( aspect .getName () ) );
500
- objectNode .put ( FIELD_OPERATION_ID , (isPut ? FIELD_PUT : FIELD_PATCH ) + aspect .getName () );
500
+ objectNode .put ( FIELD_OPERATION_ID , ( isPut ? FIELD_PUT : FIELD_PATCH ) + aspect .getName () );
501
501
objectNode .set ( FIELD_PARAMETERS , getRequiredParameters ( parameterNode , isEmpty ( resourcePath ) ) );
502
502
objectNode .set ( FIELD_REQUEST_BODY , FACTORY .objectNode ().put ( REF , COMPONENTS_REQUESTS + aspect .getName () ) );
503
503
objectNode .set ( FIELD_RESPONSES , getResponsesForGet ( aspect ) );
@@ -516,8 +516,8 @@ private void setErrorResponses( final ObjectNode responses ) {
516
516
final ObjectNode unauthorized = FACTORY .objectNode ().put ( REF , COMPONENTS_RESPONSES + UNAUTHORIZED );
517
517
final ObjectNode forbidden = FACTORY .objectNode ().put ( REF , COMPONENTS_RESPONSES + FORBIDDEN );
518
518
final ObjectNode notFoundError = FACTORY .objectNode ().put ( REF , COMPONENTS_RESPONSES + NOT_FOUND_ERROR );
519
- responses .set ( "401 " , clientError );
520
- responses .set ( "402 " , unauthorized );
519
+ responses .set ( "400 " , clientError );
520
+ responses .set ( "401 " , unauthorized );
521
521
responses .set ( "403" , forbidden );
522
522
responses .set ( "404" , notFoundError );
523
523
}
0 commit comments