From fb9a75dfd03d210f6023e4be7310877fd0c0a342 Mon Sep 17 00:00:00 2001 From: BEAUVAIS ANTOINE <antoine.beauvais@etu.unistra.fr> Date: Tue, 19 Oct 2021 15:06:14 +0200 Subject: [PATCH] Updated mappings to RESTful names. --- back-openapi.yaml | 8 ++++---- public/openapi/openapi.json | 8 ++++---- src/main/java/fr/unistra/sil/erp/back/WebMvcConfig.java | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/back-openapi.yaml b/back-openapi.yaml index 12e5231..46f508b 100644 --- a/back-openapi.yaml +++ b/back-openapi.yaml @@ -12,7 +12,7 @@ info: name: CeCILL-B url: https://cecill.info/licences/Licence_CeCILL-B_V1-en.html paths: - /retrieveItems: + /product: get: description: | Returns the list of all available items. @@ -50,7 +50,7 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorMessage' - /retrieveCategories: + /category: get: description: | Returns the list of all existing categories. @@ -70,7 +70,7 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorMessage' - /retrieveStocks: + /stock: get: description: | Returns the stocks for each item (their quantity). @@ -90,7 +90,7 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorMessage' - /submitTransaction: + /transaction: post: description: Submits a new transaction into the system. operationId: submitTransaction diff --git a/public/openapi/openapi.json b/public/openapi/openapi.json index 23f8a9c..70b37c2 100644 --- a/public/openapi/openapi.json +++ b/public/openapi/openapi.json @@ -15,7 +15,7 @@ } }, "paths": { - "/retrieveItems": { + "/product": { "get": { "description": "Returns the list of all available items.\n\nIt is also possible to filter items by category.\n", "operationId": "retrieveItems", @@ -71,7 +71,7 @@ } } }, - "/retrieveCategories": { + "/category": { "get": { "description": "Returns the list of all existing categories.\n", "operationId": "retrieveCategories", @@ -102,7 +102,7 @@ } } }, - "/retrieveStocks": { + "/stock": { "get": { "description": "Returns the stocks for each item (their quantity).\n", "operationId": "retrieveStocks", @@ -133,7 +133,7 @@ } } }, - "/submitTransaction": { + "/transaction": { "post": { "description": "Submits a new transaction into the system.", "operationId": "submitTransaction", diff --git a/src/main/java/fr/unistra/sil/erp/back/WebMvcConfig.java b/src/main/java/fr/unistra/sil/erp/back/WebMvcConfig.java index 5164398..86f0a21 100644 --- a/src/main/java/fr/unistra/sil/erp/back/WebMvcConfig.java +++ b/src/main/java/fr/unistra/sil/erp/back/WebMvcConfig.java @@ -48,25 +48,25 @@ public class WebMvcConfig implements WebMvcConfigurer { * API Mapping for retrieving all items. */ public static final String MAPPING_RETRIEVEALL = API_FULL_PREFIX + - "/retrieveItems"; + "/item"; /** * API Mapping for retrieving all categories. */ public static final String MAPPING_GETCATEGORIES = API_FULL_PREFIX + - "/retrieveCategories"; + "/category"; /** * API Mapping for submitting transactions. */ public static final String MAPPING_SUBTRANSAC = API_FULL_PREFIX + - "/submitTransaction"; + "/transaction"; /** * API Mapping for retrieving stocks. */ public static final String MAPPING_GETSTOCKS = API_FULL_PREFIX + - "/retrieveStocks"; + "/stock"; /** * Web mapping for the login page. -- GitLab