This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k-examples.git
The following commit(s) were added to refs/heads/main by this push:
new 72e06ab Update greetings-api.json to openapi v3 (#104)
72e06ab is described below
commit 72e06aba53f1139ff7d56c03644a3fa47999e151
Author: Martin Borgman <[email protected]>
AuthorDate: Wed Nov 6 17:32:24 2024 +0100
Update greetings-api.json to openapi v3 (#104)
Apparently OpenAPI v2 is no longer supported
---
generic-examples/openapi/greetings-api.json | 84 +++++++++++++++++------------
1 file changed, 50 insertions(+), 34 deletions(-)
diff --git a/generic-examples/openapi/greetings-api.json
b/generic-examples/openapi/greetings-api.json
index 48e8f9e..56e429e 100644
--- a/generic-examples/openapi/greetings-api.json
+++ b/generic-examples/openapi/greetings-api.json
@@ -1,46 +1,62 @@
{
- "swagger" : "2.0",
- "info" : {
- "version" : "1.0",
- "title" : "Greeting REST API"
+ "openapi": "3.0.1",
+ "info": {
+ "title": "Greeting REST API",
+ "version": "1.0"
},
- "host" : "",
- "basePath" : "/camel/",
- "tags" : [ {
- "name" : "greetings",
- "description" : "Greeting to {name}"
- } ],
- "schemes" : [ "http" ],
- "paths" : {
- "/greetings/{name}" : {
- "get" : {
- "tags" : [ "greetings" ],
- "operationId" : "greeting-api",
- "parameters" : [ {
- "name" : "name",
- "in" : "path",
- "required" : true,
- "type" : "string"
- } ],
- "responses" : {
- "200" : {
- "description" : "Output type",
- "schema" : {
- "$ref" : "#/definitions/Greetings"
+ "servers": [
+ {
+ "url": "/camel/"
+ }
+ ],
+ "tags": [
+ {
+ "name": "greetings",
+ "description": "Greeting to {name}"
+ }
+ ],
+ "paths": {
+ "/greetings/{name}": {
+ "get": {
+ "tags": [
+ "greetings"
+ ],
+ "operationId": "greeting-api",
+ "parameters": [
+ {
+ "name": "name",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Output type",
+ "content": {
+ "*/*": {
+ "schema": {
+ "$ref": "#/components/schemas/Greetings"
+ }
+ }
}
}
}
}
}
},
- "definitions" : {
- "Greetings" : {
- "type" : "object",
- "properties" : {
- "greetings" : {
- "type" : "string"
+ "components": {
+ "schemas": {
+ "Greetings": {
+ "type": "object",
+ "properties": {
+ "greetings": {
+ "type": "string"
+ }
}
}
}
}
-}
\ No newline at end of file
+}