commit
ba700001b8
@ -0,0 +1,120 @@ |
||||
openapi: '3.0.2' |
||||
info: |
||||
title: RENFE WSMR API |
||||
version: '1.0' |
||||
servers: |
||||
- url: https://wsmr.renfe.es/wsmRestApi/v1/ |
||||
paths: |
||||
/stations: |
||||
get: |
||||
tags: |
||||
- station |
||||
summary: List all stations |
||||
parameters: |
||||
- $ref: '#/components/parameters/app' |
||||
- $ref: '#/components/parameters/appVersion' |
||||
- $ref: '#/components/parameters/osName' |
||||
- $ref: '#/components/parameters/osVersion' |
||||
- $ref: '#/components/parameters/language' |
||||
responses: |
||||
'200': |
||||
description: OK |
||||
content: |
||||
application/json: |
||||
schema: |
||||
$ref: '#/components/schemas/GetStationsResponse' |
||||
/stations/nearest: |
||||
get: |
||||
tags: |
||||
- station |
||||
summary: List nearest stations |
||||
parameters: |
||||
- $ref: '#/components/parameters/app' |
||||
- $ref: '#/components/parameters/appVersion' |
||||
- $ref: '#/components/parameters/osName' |
||||
- $ref: '#/components/parameters/osVersion' |
||||
- $ref: '#/components/parameters/language' |
||||
- in: query |
||||
name: lat |
||||
description: Latitude |
||||
schema: |
||||
type: number |
||||
format: float |
||||
example: 41.392710 |
||||
- in: query |
||||
name: lon |
||||
description: Longitude |
||||
schema: |
||||
type: number |
||||
format: float |
||||
example: 2.109310 |
||||
responses: |
||||
'200': |
||||
description: OK |
||||
content: |
||||
application/json: |
||||
schema: |
||||
$ref: '#/components/schemas/GetStationsResponse' |
||||
components: |
||||
parameters: |
||||
app: |
||||
name: app |
||||
required: true |
||||
in: header |
||||
schema: |
||||
type: string |
||||
default: VMR |
||||
appVersion: |
||||
name: appVersion |
||||
required: true |
||||
in: header |
||||
schema: |
||||
type: string |
||||
example: 01.00.00 |
||||
osName: |
||||
name: osName |
||||
required: false |
||||
in: header |
||||
schema: |
||||
type: string |
||||
example: 0R |
||||
osVersion: |
||||
name: osVersion |
||||
required: true |
||||
in: header |
||||
schema: |
||||
type: string |
||||
example: 1 |
||||
language: |
||||
name: language |
||||
required: false |
||||
in: header |
||||
schema: |
||||
type: string |
||||
example: 'en' |
||||
schemas: |
||||
GetStationsResponse: |
||||
type: object |
||||
properties: |
||||
station: |
||||
required: true |
||||
type: array |
||||
items: |
||||
$ref: '#/components/schemas/Station' |
||||
lastUpdateStations: |
||||
type: string |
||||
required: false |
||||
format: 'date-time' |
||||
example: "2022-03-01 01:06:25.034" |
||||
Station: |
||||
type: object |
||||
properties: |
||||
code: |
||||
type: string |
||||
example: "71801" |
||||
description: |
||||
type: string |
||||
example: "Barcelona-Sans" |
||||
stationType: |
||||
type: string |
||||
example: "1" |
Loading…
Reference in new issue