Skip to content

Commit

Permalink
Fixes in the API specifications and Server component, part of #1309:
Browse files Browse the repository at this point in the history
- In V1 spec:
  - Removed definitions to the new HTTP verbs, they aren't supposed to be part of V1 spec
  - Removed the depracation warnings on V1 endpoints
  - Fixed server definition and API version number
- In V2 spec:
  - Removed all endpoints previously marked as depracated, including those with duplicate
    HTTP verbs. Only the correct verbs remain in V2.
  - Removed GET /mapconfig/create/{map} and GET /mapconfig/delete/{map}. They are both
    taken care of using PUT respectively DELETE /mapconfig/{name}.
  - Fixed server definition and API version number
- Necessary changes in server.js to accomodate for the new file names.
  • Loading branch information
jacobwod committed Mar 29, 2023
1 parent b1ad1a9 commit 48a4c8a
Show file tree
Hide file tree
Showing 3 changed files with 689 additions and 80 deletions.
77 changes: 1 addition & 76 deletions new-backend/server/common/api.v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ openapi: 3.0.3
info:
title: hajk-backend
description: Hajk backend
version: 1.1.0
version: 1.0.0
servers:
- url: /api/v1
- url: /api/v2
tags:
- name: Client-accessible
description: Resources necessary to load a working map in client
Expand Down Expand Up @@ -48,7 +47,6 @@ paths:
$ref: "#/components/schemas/Error"
/informative/create:
post:
deprecated: true
tags:
- Admin - Informative/DocumentHandler
responses:
Expand All @@ -64,22 +62,6 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/Error"
put:
tags:
- Admin - Informative/DocumentHandler
responses:
200:
description: Create a document connected to a specified map
content:
application/json:
schema:
$ref: "#/components/schemas/InformativeDocumentCreateBody"
5XX:
description: Internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/informative/list:
get:
tags:
Expand Down Expand Up @@ -123,30 +105,6 @@ paths:
$ref: "#/components/schemas/Error"
/informative/save/{name}:
post:
deprecated: true
tags:
- Admin - Informative/DocumentHandler
parameters:
- name: name
in: path
description: Document to be saved
required: true
schema:
type: string
responses:
200:
description: Return the saved document's body
content:
application/json:
schema:
$ref: "#/components/schemas/DocumentsList"
5XX:
description: Internal server error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
put:
tags:
- Admin - Informative/DocumentHandler
parameters:
Expand Down Expand Up @@ -331,7 +289,6 @@ paths:
content: {}
/mapconfig/create/{name}:
get:
deprecated: true
tags:
- Admin - Maps and layers
parameters:
Expand Down Expand Up @@ -361,38 +318,6 @@ paths:
200:
description: Success
content: {}
/mapconfig/delete/{name}:
get:
deprecated: true
tags:
- Admin - Maps and layers
parameters:
- name: name
in: path
description: Name of the map to be deleted
required: true
schema:
type: string
description: Delete an existing map configuration
responses:
200:
description: Success
content: {}
delete:
tags:
- Admin - Maps and layers
parameters:
- name: name
in: path
description: Name of the map to be deleted
required: true
schema:
type: string
description: Delete an existing map configuration
responses:
200:
description: Success
content: {}
/mapconfig/duplicate/{nameFrom}/{nameTo}:
put:
tags:
Expand Down
Loading

0 comments on commit 48a4c8a

Please sign in to comment.