Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/ add symbol model properties #14

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/edr_pydantic/unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
class Symbol(EdrBaseModel, extra="allow"):
value: str
type: str
title: Optional[str] = None
description: Optional[str] = None
Comment on lines +12 to +13
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link you gave points to Annex A (informative), and shows just having value and type is correct:
https://docs.ogc.org/is/19-086r6/19-086r6.html#req_edr_rc-parameters

The table you base you changes on is inconsistent with this (also C.13 is different):
https://docs.ogc.org/is/19-086r6/19-086r6.html#_5378d779-6a38-4607-9051-6f12c3d3107b

The schema also says just value and type is correct:
https://schemas.opengis.net/ogcapi/edr/1.1/openapi/schemas/collections/units.yaml

CovJSON spec also says what we currently have is correct:
https://docs.ogc.org/cs/21-069r2/21-069r2.html

So the spec is inconsistent. So far the conclusion has been that the schema is leading.

We should make an issue on the OGC EDR repo to clarify what the intention was, something like this:
opengeospatial/ogcapi-environmental-data-retrieval#582

Note that the extra=allow means you can already add those fields in your implementation.



class Unit(EdrBaseModel):
Expand Down