summaryrefslogtreecommitdiff
path: root/jws/endpoints/src/main/resources
diff options
context:
space:
mode:
authorMartial Simon <msimon_fr@hotmail.com>2025-09-15 01:07:58 +0200
committerMartial Simon <msimon_fr@hotmail.com>2025-09-15 01:07:58 +0200
commit967be9e750221ab2ab783f95df79bb26d290a45e (patch)
tree6802900a5e975f9f68b169f0f503f040056d6952 /jws/endpoints/src/main/resources
add: added projectsHEADmain
Diffstat (limited to 'jws/endpoints/src/main/resources')
-rw-r--r--jws/endpoints/src/main/resources/application.properties7
-rw-r--r--jws/endpoints/src/main/resources/openapi.yaml80
2 files changed, 87 insertions, 0 deletions
diff --git a/jws/endpoints/src/main/resources/application.properties b/jws/endpoints/src/main/resources/application.properties
new file mode 100644
index 0000000..b3b3d13
--- /dev/null
+++ b/jws/endpoints/src/main/resources/application.properties
@@ -0,0 +1,7 @@
+%dev.quarkus.http.port=8082
+%dev.quarkus.swagger-ui.enable=true
+
+quarkus.log.category."org.apache.kafka".level=WARN
+quarkus.devservices.enabled=false
+
+quarkus.http.cors=true
diff --git a/jws/endpoints/src/main/resources/openapi.yaml b/jws/endpoints/src/main/resources/openapi.yaml
new file mode 100644
index 0000000..7e8ac48
--- /dev/null
+++ b/jws/endpoints/src/main/resources/openapi.yaml
@@ -0,0 +1,80 @@
+---
+openapi: 3.1.0
+tags:
+- name: Greeting
+- name: String Operations
+servers:
+ - url: http://localhost:8082/
+components:
+ schemas:
+ HelloResponse:
+ type: object
+ properties:
+ content:
+ type: string
+ example: "hello test"
+ ReverseRequest:
+ type: object
+ properties:
+ content:
+ type: string
+ example: "hello\ntest"
+ ReverseResponse:
+ type: object
+ properties:
+ original:
+ type: string
+ example: "hello\ntest"
+ reversed:
+ type: string
+ example: "tset\nolleh"
+paths:
+ /hello/{name}:
+ get:
+ summary: Greet by name
+ description: "Returns a greeting message in the format `hello {name}` using\
+ \ the provided name."
+ tags:
+ - Greeting
+ parameters:
+ - name: name
+ in: path
+ required: true
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Greeting message returned successfully.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/HelloResponse"
+ "400":
+ description: "Bad request: The name parameter is null or empty."
+ /reverse:
+ post:
+ summary: Reverse a string
+ description: "Accepts a JSON request containing a string, reverses the string,\
+ \ and returns both the original and reversed versions."
+ tags:
+ - String Operations
+ requestBody:
+ description: JSON object containing the string to be reversed.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ReverseRequest"
+ required: true
+ responses:
+ "200":
+ description: Reversed string returned successfully.
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ReverseResponse"
+ "400":
+ description: "Bad request: Request body is null or the string content is\
+ \ null or empty."
+info:
+ title: endpoints API
+ version: "1.0"