Skip to content

Commit

Permalink
remove id from zepplin
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-confino committed Jun 4, 2024
1 parent 4feb8e6 commit 1999871
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
public class ZepplinResource {

@DELETE
@Path("{id}")
@APIResponse(responseCode = "200", description = "Review deleted")
@APIResponse(responseCode = "404", description = "Review not found")
@Operation(summary = "Deprecate outdated airship technology", operationId = "deprecateZepplin")
Expand All @@ -48,7 +47,6 @@ public Response deprecateZepplin(String string) {
}

@HEAD
@Path("{id}")
@APIResponse(responseCode = "200", description = "Review deleted")
@APIResponse(responseCode = "404", description = "Review not found")
@Operation(summary = "Deprecate outdated airship technology", operationId = "deprecateZepplin")
Expand All @@ -62,7 +60,6 @@ public Response headZepplin() {
}

@GET
@Path("{id}")
@APIResponse(responseCode = "200", description = "Review deleted")
@APIResponse(responseCode = "404", description = "Review not found")
@Operation(summary = "Deprecate outdated airship technology", operationId = "deprecateZepplin")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,13 @@ public OpenAPI buildModel() {
.description(
"Indicates that the deletion event was processed successfully")))))
.paths(OASFactory.createObject(Paths.class)
.addPathItem("/zepplins/{id}", OASFactory.createObject(PathItem.class)
.addPathItem("/zepplins", OASFactory.createObject(PathItem.class)
.HEAD(OASFactory.createObject(Operation.class)
.requestBody(OASFactory.createRequestBody()
.ref("#/paths/~1zepplins~1{id}/delete/requestBody")))
.ref("#/paths/~1zepplins/delete/requestBody")))
.GET(OASFactory.createObject(Operation.class)
.requestBody(OASFactory.createRequestBody()
.ref("#/paths/~1zepplins~1{id}/delete/requestBody")))
.ref("#/paths/~1zepplins/delete/requestBody")))
.DELETE(OASFactory.createObject(Operation.class)
.requestBody(OASFactory.createRequestBody()
.description("Something about a zepplin.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ public void testParameter(String type) {
}

private void testParameterWithObjectAndStyle(ValidatableResponse vr) {
String headParameters = "paths.'/zepplins/{id}'.head.parameters";
String getParameters = "paths.'/zepplins/{id}'.get.parameters";
String headParameters = "paths.'/zepplins'.head.parameters";
String getParameters = "paths.'/zepplins'.get.parameters";

vr.body(headParameters, hasSize(1));
vr.body(getParameters, hasSize(1));
Expand Down Expand Up @@ -565,7 +565,7 @@ public void testSecurityRequirement(String type) {
hasEntry(equalTo("userApiKey"), empty()),
hasEntry(equalTo("userBearerHttp"), empty()))));

vr.body("paths.'/zepplins/{id}'.delete.security[0].mutualTLSScheme[0]", equalTo("zepplinScope"));
vr.body("paths.'/zepplins'.delete.security[0].mutualTLSScheme[0]", equalTo("zepplinScope"));
}

@Test(dataProvider = "formatProvider")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,10 @@ public void testWebhooks(String type) {
public void testRequestBodyInOperations(String type) {
ValidatableResponse vr = callEndpoint(type);

vr.body("paths.'/zepplins/{id}'.delete.requestBody.description", equalTo("Something about a zepplin."));
vr.body("paths.'/zepplins/{id}'.head.requestBody.$ref", equalTo("#/paths/~1zepplins~1{id}/delete/requestBody"));
vr.body("paths.'/zepplins/{id}'.get.requestBody.$ref", equalTo("#/paths/~1zepplins~1{id}/delete/requestBody"));
vr.body("paths.'/zepplins'.delete.requestBody.description", equalTo("Something about a zepplin."));
vr.body("paths.'/zepplins'.head.requestBody.$ref", equalTo("#/paths/~1zepplins/delete/requestBody"));
vr.body("paths.'/zepplins'.get.requestBody.$ref", equalTo("#/paths/~1zepplins/delete/requestBody"));

vr.body("paths.'/zepplins/{id}'.delete.requestBody.content", notNullValue());
vr.body("paths.'/zepplins'.delete.requestBody.content", notNullValue());
}
}

0 comments on commit 1999871

Please sign in to comment.