-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dfb9d5f
commit c7be4d5
Showing
7 changed files
with
76 additions
and
7 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
api.planx.uk/proxy/ordnanceSurvey.ts → ...x.uk/modules/ordnanceSurvey/controller.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
openapi: 3.1.0 | ||
info: | ||
title: Plan✕ API | ||
version: 0.1.0 | ||
tags: | ||
- name: ordnance survey | ||
description: Proxy authenticated requests to the OS Data Hub APIs | ||
externalDocs: | ||
url: https://osdatahub.os.uk/docs | ||
components: | ||
schemas: | ||
AnyParams: | ||
description: Any query parameters accepted by OS Data Hub APIs | ||
name: queryParams | ||
in: query | ||
schema: | ||
type: object | ||
example: | ||
key1: value1 | ||
key2: value2 | ||
AnyBody: | ||
description: Any JSON body accepted by OS Data Hub APIs | ||
required: false | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
example: | ||
key1: value1 | ||
key2: value2 | ||
paths: | ||
/proxy/ordnance-survey: | ||
get: | ||
tags: [ordnance survey] | ||
parameters: | ||
- $ref: "#/components/schemas/AnyParams" | ||
requestBody: | ||
$ref: "#/components/schemas/AnyBody" | ||
put: | ||
tags: [ordnance survey] | ||
parameters: | ||
- $ref: "#/components/schemas/AnyParams" | ||
requestBody: | ||
$ref: "#/components/schemas/AnyBody" | ||
post: | ||
tags: [ordnance survey] | ||
parameters: | ||
- $ref: "#/components/schemas/AnyParams" | ||
requestBody: | ||
$ref: "#/components/schemas/AnyBody" | ||
delete: | ||
tags: [ordnance survey] | ||
parameters: | ||
- $ref: "#/components/schemas/AnyParams" | ||
requestBody: | ||
$ref: "#/components/schemas/AnyBody" | ||
patch: | ||
tags: [ordnance survey] | ||
parameters: | ||
- $ref: "#/components/schemas/AnyParams" | ||
requestBody: | ||
$ref: "#/components/schemas/AnyBody" |
4 changes: 2 additions & 2 deletions
4
api.planx.uk/proxy/ordnanceSurvey.test.ts → ...les/ordnanceSurvey/ordnanceSurvey.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Router } from "express"; | ||
import { useOrdnanceSurveyProxy } from "./controller"; | ||
|
||
const router = Router(); | ||
|
||
router.use("/proxy/ordnance-survey", useOrdnanceSurveyProxy); | ||
|
||
export default router; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.