-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
Signed-off-by: Daniel Widdis <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
{ | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dbwiddis
Author
Member
|
||
"openapi": "3.0.3", | ||
"info": { | ||
"title": "Hello World", | ||
"description": "This is a sample Hello World extension.", | ||
"license": { | ||
"name": "Apache 2.0", | ||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html" | ||
}, | ||
"version": "1.0.0-SNAPSHOT" | ||
}, | ||
"tags": [ | ||
{ | ||
"name": "hello", | ||
"description": "Worldly Greetings" | ||
} | ||
], | ||
"paths": { | ||
"/hello": { | ||
"get": { | ||
"tags": [ | ||
"hello" | ||
], | ||
"summary": "Greet the world", | ||
"description": "Traditional greeting", | ||
"responses": { | ||
"200": { | ||
"description": "Successful operation", | ||
"content": { | ||
"text/plain; charset=utf-8": { | ||
"examples": { | ||
"Default Response": { | ||
"value": "Hello, World!" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"400": { | ||
"description": "Syntax Error in URI" | ||
}, | ||
"404": { | ||
"description": "Improper REST action configuration" | ||
} | ||
} | ||
} | ||
}, | ||
"/hello/{name}": { | ||
"put": { | ||
"tags": [ | ||
"hello" | ||
], | ||
"summary": "Update world name", | ||
"description": "Rename the world", | ||
"parameters": [ | ||
{ | ||
"name": "name", | ||
"in": "path", | ||
"description": "a new name for the world", | ||
"required": true, | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Successful operation", | ||
"content": { | ||
"text/plain; charset=utf-8": { | ||
"examples": { | ||
"Default Response": { | ||
"value": "Updated the world's name to OpenSearch" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"400": { | ||
"description": "Syntax Error in URI" | ||
}, | ||
"404": { | ||
"description": "Improper REST action configuration" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
openapi: 3.0.3 | ||
info: | ||
title: Hello World | ||
description: This is a sample Hello World extension. | ||
license: | ||
name: Apache 2.0 | ||
url: http://www.apache.org/licenses/LICENSE-2.0.html | ||
version: 1.0.0-SNAPSHOT | ||
tags: | ||
- name: hello | ||
description: Worldly Greetings | ||
paths: | ||
/hello: | ||
get: | ||
tags: | ||
- hello | ||
summary: Greet the world | ||
description: Traditional greeting | ||
responses: | ||
'200': | ||
description: Successful operation | ||
content: | ||
text/plain; charset=utf-8: | ||
examples: | ||
Default Response: | ||
value: Hello, World! | ||
'400': | ||
description: Syntax Error in URI | ||
'404': | ||
description: Improper REST action configuration | ||
/hello/{name}: | ||
put: | ||
tags: | ||
- hello | ||
summary: Update world name | ||
description: Rename the world | ||
parameters: | ||
- name: name | ||
in: path | ||
description: a new name for the world | ||
required: true | ||
schema: | ||
type: string | ||
responses: | ||
'200': | ||
description: Successful operation | ||
content: | ||
text/plain; charset=utf-8: | ||
examples: | ||
Default Response: | ||
value: Updated the world's name to OpenSearch | ||
'400': | ||
description: Syntax Error in URI | ||
'404': | ||
description: Improper REST action configuration |
For my understanding. How are we using this json file and where exactly?