You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2024/03/26 09:52:57 UTC
(camel-kamelets-examples) branch main updated: Convert to swagger 3
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets-examples.git
The following commit(s) were added to refs/heads/main by this push:
new 9a97cc7 Convert to swagger 3
9a97cc7 is described below
commit 9a97cc7da5ae481035fcc0c23af2297a1499acb8
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Mar 26 10:52:50 2024 +0100
Convert to swagger 3
---
jbang/open-api/greetings-api.json | 82 +++++++++++++++++++++++----------------
1 file changed, 49 insertions(+), 33 deletions(-)
diff --git a/jbang/open-api/greetings-api.json b/jbang/open-api/greetings-api.json
index 48e8f9e..74d3e39 100644
--- a/jbang/open-api/greetings-api.json
+++ b/jbang/open-api/greetings-api.json
@@ -1,44 +1,60 @@
{
- "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"
+ }
}
}
}