-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi3.yaml
More file actions
177 lines (177 loc) · 4.98 KB
/
Copy pathopenapi3.yaml
File metadata and controls
177 lines (177 loc) · 4.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
openapi: 3.0.3
info:
title: Layers & Specs API
description: >
API for retrieving geographic layer specifications. Layers expose a set of
properties; `enum`-typed properties also carry their list of allowed values.
version: 1.1.0
license:
name: Proprietary
url: https://example.com/licenses/proprietary
paths:
/layers:
get:
summary: Get all layer names
operationId: getLayers
security: []
responses:
'200':
$ref: '#/components/responses/LayerListResponse'
'404':
$ref: '#/components/responses/NotFound'
/layers/{layerName}:
get:
summary: Get layer spec by name
operationId: getLayerByName
security: []
parameters:
- $ref: '#/components/parameters/LayerNameParam'
responses:
'200':
$ref: '#/components/responses/LayerSpecResponse'
'404':
$ref: '#/components/responses/NotFound'
components:
parameters:
LayerNameParam:
name: layerName
in: path
required: true
description: The name of the layer (matches `Property.layerName`)
schema:
type: string
example: buildings_polygon
responses:
LayerListResponse:
description: A list of layers with their display aliases
content:
application/json:
schema:
$ref: '#/components/schemas/LayerList'
example:
layers:
- layerName: buildings_polygon
alias: Buildings
- layerName: fences_line
alias: Fences
LayerSpecResponse:
description: Full layer specification including its properties
content:
application/json:
schema:
$ref: '#/components/schemas/LayerSpec'
example:
layerName: buildings_polygon
alias: Buildings Polygon
properties:
- property: code
type: xsd:long
possibleValues:
- '1001'
- '1002'
- property: name
type: xsd:string
- property: number_of_floors
type: xsd:long
alias: Number of Floors
- property: geom
type: gml:PolygonPropertyType
NotFound:
description: The requested resource was not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
LayerSummary:
type: object
description: Basic layer info returned in the list endpoint.
properties:
layerName:
type: string
description: Name of the layer
example: buildings_polygon
alias:
type: string
description: Display alias for the layer
example: Buildings
required:
- layerName
- alias
LayerList:
type: object
description: Response wrapper for the list of layers.
properties:
layers:
type: array
items:
$ref: '#/components/schemas/LayerSummary'
required:
- layers
LayerSpec:
type: object
description: >
A layer and all of its properties. Groups rows from the `Property`
entity by `layerName`.
properties:
layerName:
type: string
description: Name of the layer
example: buildings_polygon
alias:
type: string
description: Display alias for the layer
example: Buildings
properties:
type: array
items:
$ref: '#/components/schemas/Property'
required:
- layerName
- alias
- properties
Property:
type: object
description: >
A single property definition for a layer. Mirrors the `Property` entity,
minus `id` and `layerName` (which are implicit on the parent
`LayerSpec`). When the property has coded/enumerated values,
`possibleValues` is populated.
properties:
property:
type: string
description: Property name
example: code
type:
$ref: '#/components/schemas/Type'
alias:
type: string
description: Display alias for the property
example: Number of Floors
possibleValues:
type: array
description: >
Allowed values for properties that have a fixed set of coded values.
Omitted when the property accepts arbitrary values.
items:
type: string
required:
- property
- type
Type:
type: string
description: GeoServer-compatible WFS type (XSD scalar or GML geometry)
example: xsd:string
Error:
type: object
description: Standard error response
properties:
code:
type: integer
example: 404
message:
type: string
example: Layer not found
required:
- code
- message