Skip to content

Commit

Permalink
add constructs to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gracekarina committed Nov 13, 2023
1 parent 3d2bb87 commit 9a01c6e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public void testFailedToResolveExternalReferences() {
Assert.assertEquals(openAPI.getPaths().get("/permAssignments").getGet().getResponses().get("202").getContent().get("application/vnd.api+json").getSchema().get$ref(),"#/components/schemas/schemaResponseSuccess");
Assert.assertTrue(openAPI.getPaths().get("/permAssignmentChangeRequests").get$ref() == null);
Assert.assertEquals(openAPI.getPaths().get("/permAssignmentChangeRequests").getGet().getResponses().get("202").getContent().get("application/vnd.api+json").getSchema().get$ref(),"#/components/schemas/schemaResponseSuccess");
Assert.assertTrue(openAPI.getPaths().get("/permAssignmentChange").get$ref() == null);
Assert.assertEquals(openAPI.getPaths().get("/permAssignmentChange").getGet().getResponses().get("201").getContent().get("application/vnd.api+json").getSchema().get$ref(),"#/components/schemas/Error");
Assert.assertEquals(openAPI.getPaths().get("/permAssignmentChange").getGet().getResponses().get("404").getContent().get("application/vnd.api+json").getSchema().get$ref(),"#/components/schemas/RemoteError");

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ paths:
$ref: 'resolve-external-ref/pathItems.yaml#/components/pathitems/permAssignments'
/permAssignmentChangeRequests:
$ref: 'resolve-external-ref/pathItems.yaml#/components/pathitems/permAssignments'
/permAssignmentChange:
$ref: 'resolve-external-ref/pathItems.yaml#/components/pathitems/permAssignmentChange'

components:
securitySchemes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,33 @@ components:
content:
application/vnd.api+json:
schema:
"$ref": schemas.yaml#/components/schemas/schemaResponseError
"$ref": schemas.yaml#/components/schemas/schemaResponseError
permAssignmentChange:
get:
summary: Permanent Assignment Data Creation
responses:
'201':
description: Accepted
content:
application/vnd.api+json:
schema:
"$ref": "#/components/schemas/Error"
'404':
description: Accepted
content:
application/vnd.api+json:
schema:
"$ref": "#/components/schemas/RemoteError"
schemas:
Error:
required:
- code
- message
properties:
code:
type: integer
format: int32
message:
type: string
RemoteError:
"$ref": schemas.yaml#/components/schemas/schemaResponseError

0 comments on commit 9a01c6e

Please sign in to comment.