Skip to content

Commit

Permalink
Merge pull request #617 from benjamin-confino/585-test-for-no-response
Browse files Browse the repository at this point in the history
Create a test for an operation without resources
  • Loading branch information
Azquelt authored May 29, 2024
2 parents 84260d2 + 799d15d commit 5a95d4b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,14 @@ public void testStaticFileDefinitions(String type) {
vr.body(callbacksPath + ".responses.'204'.description",
both(containsString("Your server should return this HTTP status code if no longer interested"))
.and(containsString("in further updates")));

// Test an operation with no responses
String noResponsePath = "paths.'/streams'.get";
vr.body(noResponsePath + ".description", equalTo("An operation without a response"));
vr.body(noResponsePath + ".parameters[0].name", equalTo("callbackUrl"));
vr.body(noResponsePath + ".parameters[0].description",
equalTo("the location where data will be sent. Must be network accessible\n"
+ "by the source server\n"));
}

@Test(dataProvider = "formatProvider")
Expand Down
14 changes: 14 additions & 0 deletions tck/src/main/resources/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ info:
version: 1.0.0
paths:
/streams:
get:
description: An operation without a response
parameters:
- name: callbackUrl
in: query
required: true
description: |
the location where data will be sent. Must be network accessible
by the source server
schema:
type: string
format: uri
examples:
- https://tonys-server.com
post:
description: subscribes a client to receive out-of-band data
parameters:
Expand Down

0 comments on commit 5a95d4b

Please sign in to comment.