対応する OGC API モジュールと組み合わせて geoserver-2.16.x-2020-02-19-war を使用します。
Shape ファイルをデータベースとして使用していますが、すべて正常に動作します。
API 定義ドキュメント内で、パス定義を見つけます。
/collections/{collectionId}:
get:
tags:
- Capabilities
summary: describe the feature collection with id `collectionId`
operationId: describeCollection
parameters:
- $ref: '#/components/parameters/collectionId'
- $ref: '#/components/parameters/otherParameters'
responses:
"200":
content:
application/x-yaml:
schema:
type: string
format: binary
application/json:
schema:
type: string
format: binary
application/cbor:
schema:
type: string
format: binary
text/html:
schema:
type: string
$ref: '#/components/responses/Collection'
$ref 参照 ('#/components/responses/Collection') には、次の情報が含まれています。
content:
application/json:
schema:
$ref: '#/components/schemas/collection'
example:
id: buildings
title: Buildings
description: Buildings in the city of Bonn.
extent:
spatial:
bbox:
- - 7.01
- 50.63
- 7.22
- 50.78
temporal:
interval:
- - 2010-02-15T12:34:56Z
- null
links:
- href: http://data.example.org/collections/buildings/items
rel: items
type: application/geo+json
title: Buildings
- href: http://data.example.org/collections/buildings/items.html
rel: items
type: text/html
title: Buildings
- href: https://creativecommons.org/publicdomain/zero/1.0/
rel: license
type: text/html
title: CC0-1.0
- href: https://creativecommons.org/publicdomain/zero/1.0/rdf
rel: license
type: application/rdf+xml
title: CC0-1.0
text/html:
schema:
type: string
ここで私の最初の質問:「#/components/responses/Collection/content」と「#/paths/collections/{collectionId}/get/responses/200/content」で指定された異なる応答メディア タイプがあるのはなぜですか?それらの関係は何ですか? ?
私の2番目の質問:
次の URL を使用して、対応する /collections/{collectionId} ドキュメントをリクエストできます。
.../collections/{collectionId}?f=text/html
.../collections/{collectionId}?f=application/json
.../collections/{collectionId}?f=application/cbor
.../collections/{collectionId}?f=application/x-yaml
/collections/{collectionId}/get/parameters で対応するパラメーター「f」が定義されていないのに、なぜそれが可能なのでしょうか?
注: Swagger OpenAPI 仕様を読みました。しかし、これらの質問に対する答えを見つけることができませんでした。
ご助力ありがとうございます。