-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
5 changed files
with
125 additions
and
7 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
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
102 changes: 102 additions & 0 deletions
102
integration-tests/rest-openapi/src/main/openapi/example.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,102 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
openapi: "3.0.3" | ||
info: | ||
title: Camel API Example | ||
version: 1.0.0 | ||
description: > | ||
This is an example API. | ||
servers: | ||
- url: http://ipsum.com/api | ||
description: Development environment. | ||
- url: http://lorem.com/api | ||
description: Production environment. | ||
|
||
paths: | ||
/v1/camel: | ||
get: | ||
operationId: findCamels | ||
summary: Find camels | ||
description: Search for camels. | ||
parameters: | ||
- in: query | ||
name: name | ||
description: A camel name. | ||
required: true | ||
schema: | ||
type: string | ||
example: "Glenn" | ||
responses: | ||
"200": | ||
description: Matching camels are returned. | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
required: | ||
- camelList | ||
properties: | ||
camelList: | ||
description: List containing matching camels. | ||
type: array | ||
items: | ||
$ref: "#/components/schemas/Camel" | ||
"400": | ||
"description": "Invalid input." | ||
|
||
components: | ||
schemas: | ||
Camel: | ||
description: A representation of a camel. | ||
type: object | ||
required: | ||
- id | ||
- gender | ||
- name | ||
properties: | ||
id: | ||
$ref: "#/components/schemas/Id" | ||
gender: | ||
description: > | ||
Gender: | ||
- FEMALE: Female. | ||
- MALE: Male. | ||
type: string | ||
enum: [ FEMALE, MALE ] | ||
example: MALE | ||
birthDate: | ||
description: The date of birth. | ||
type: string | ||
format: date | ||
example: 2024-10-28Z | ||
name: | ||
description: Name. | ||
type: string | ||
example: Glenn | ||
rating: | ||
description: Rating. | ||
type: number | ||
multipleOf: 0.01 | ||
example: 3.14 | ||
|
||
Id: | ||
description: A camel id. | ||
type: string | ||
pattern: "^[A-Z]{3}-[0-9]{2}$" | ||
example: ABC-42 |
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
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