-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration tests for default responses
- Loading branch information
1 parent
0f288ae
commit ca5219d
Showing
14 changed files
with
1,490 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
openapi-integration-tests/src/test/resources/client/project-06/Ballerina.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
org = "openapi_client_test" | ||
name = "project" | ||
version = "0.1.0" | ||
|
||
[build-options] | ||
observabilityIncluded = true | ||
|
167 changes: 167 additions & 0 deletions
167
openapi-integration-tests/src/test/resources/client/project-06/openapi.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: Api | ||
version: 0.1.0 | ||
servers: | ||
- url: "{server}:{port}/api" | ||
variables: | ||
server: | ||
default: http://localhost | ||
port: | ||
default: "9090" | ||
paths: | ||
/albums/{id}: | ||
get: | ||
operationId: getAlbumsId | ||
parameters: | ||
- name: id | ||
in: path | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
"200": | ||
description: Ok | ||
headers: | ||
req-id: | ||
required: true | ||
schema: | ||
type: integer | ||
format: int64 | ||
user-id: | ||
required: true | ||
schema: | ||
type: string | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Album' | ||
"default": | ||
description: Default Error | ||
headers: | ||
req-id: | ||
required: true | ||
schema: | ||
type: integer | ||
format: int64 | ||
user-id: | ||
required: true | ||
schema: | ||
type: string | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ErrorMessage' | ||
/albums: | ||
get: | ||
operationId: getAlbums | ||
parameters: | ||
- name: genre | ||
in: query | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
"200": | ||
description: Ok | ||
headers: | ||
req-id: | ||
required: true | ||
schema: | ||
type: integer | ||
format: int64 | ||
user-id: | ||
required: true | ||
schema: | ||
type: string | ||
content: | ||
application/json: | ||
schema: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/Album' | ||
"default": | ||
description: NotFound | ||
headers: | ||
req-id: | ||
required: true | ||
schema: | ||
type: integer | ||
format: int64 | ||
user-id: | ||
required: true | ||
schema: | ||
type: string | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ErrorMessage' | ||
post: | ||
operationId: postAlbums | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Album' | ||
required: true | ||
responses: | ||
"201": | ||
description: Created | ||
headers: | ||
req-id: | ||
required: true | ||
schema: | ||
type: integer | ||
format: int64 | ||
user-id: | ||
required: true | ||
schema: | ||
type: string | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Album' | ||
"default": | ||
description: Conflict | ||
headers: | ||
req-id: | ||
required: true | ||
schema: | ||
type: integer | ||
format: int64 | ||
user-id: | ||
required: true | ||
schema: | ||
type: string | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/ErrorMessage' | ||
components: | ||
schemas: | ||
Album: | ||
required: | ||
- artist | ||
- genre | ||
- id | ||
- name | ||
type: object | ||
properties: | ||
id: | ||
type: string | ||
name: | ||
type: string | ||
artist: | ||
type: string | ||
genre: | ||
type: string | ||
additionalProperties: false | ||
ErrorMessage: | ||
required: | ||
- message | ||
type: object | ||
properties: | ||
message: | ||
type: string | ||
additionalProperties: | ||
type: string |
8 changes: 8 additions & 0 deletions
8
openapi-integration-tests/src/test/resources/client/project-07/Ballerina.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
org = "openapi_client_test" | ||
name = "project" | ||
version = "0.1.0" | ||
|
||
[build-options] | ||
observabilityIncluded = true | ||
|
Oops, something went wrong.