opengeospatial/ogcapi-environmental-data-retrieval

Correct format for DataQuery coords?

Closed this issue ยท 3 comments

Hi,
I'm implementing an EDR server, currently on the DataQuery portions of the Collection metadata response.

I've been looking at the OpenAPI definitions for DataQuery.yaml (on both the master branch and 1.0.0-draft.1 tag) and the examples given for coords don't seem to match the schema.

For example, consider this extract from positionDataQuery.yaml on master:

  coords:
    description:  Well Known Text Point which describes the required position
    type: object
    properties:
      description:
        type: string
      type:
        type: string
    example: POINT(0 51.48)

The example is a string, rather than an object?

The schema suggests to me that the response is intended to look like this:

coords:
    description: ???
    type: ???

(I've put the ??? because I'm not sure what is expected to go into these fields)

Whereas the example suggests the response should look like this:

coords: POINT(0 51.48)

Is anyone able to clarify this for me please?

Hi @crbunney the coords attribute was originally intended to provide an information on how the coords query parameters are constructed in the collections metadata response. It is duplicating the information that is more clearly defined in the
OpenAPI schemas for the query patterns and is optional.

coords:
description: Well Known Text Point which describes the required position
type: POINT(0 51.48)

Thanks @m-burgoyne

I'm no OpenApi expert, but does that then mean that this would be a more accurate representation?

coords:
    type: object
    properties:
      description:
        type: string
        example: Well Known Text Point which describes the required position
      type:
        type: string
        example: POINT(0 51.48)

I was just thinking I could create a pull request to make that change, but I see there's already #361 which is addressing this by removing it, so I'll just close this issue instead