GeezerVison is showing github.com — feat: generate an OpenAPI 3.1 contract from the enriched catalog by estebanzimanyi · Pull Request #5 · MobilityDB/MEOS-API
Conversation
OpenAPI 3.1 projection
generator/openapi.py + generate_openapi.py project the enriched MEOS catalog onto an OpenAPI 3.1 contract — the concrete realisation of "OpenAPI is a projection of MEOS-API".
python run.py # enriched catalog -> output/meos-idl.json
python generate_openapi.py # -> output/meos-openapi.json
How
- One RPC-style
POST /{function} per stateless-exposable function (a MEOS function ≈ an OGC API – Processes "process").
- Opaque values cross the wire as strings in their
typeEncodings (text / MF-JSON / HexWKB), surfaced as reusable components.schemas.
- Enums render as string component schemas with the real C constant names.
x-meos-{category,decode,encode,in,out,encodings} extensions make the document self-describing, so a downstream server / MCP / gRPC generator needs nothing beyond this file.
- Pure
dict → dict (no libclang, no MEOS runtime); output is deterministically sorted so generated diffs are reviewable.
docs/openapi.md documents the projection rules and x-meos-* extensions; tests/test_openapi.py holds worked examples (python3 tests/test_openapi.py).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced May 20, 2026
estebanzimanyi
added a commit
that referenced
this pull request
May 20, 2026
Runs the full regenerate path on every PR touching the parser, generator,
meta files, or generate_openapi.py:
- libclang sysroot install (matches MobilityAPI vendor-drift)
- clone MobilityDB master for MEOS headers
- run.py + generate_openapi.py
- openapi-spec-validator against OpenAPI 3.1
- upload meos-openapi.json as an artefact
Catches OpenAPI 3.1 violations the moment a generator change introduces
them, instead of letting downstream consumers (MobilityAPI vendor-drift,
PyMEOS-CFFI codegen, MobilityDuck binding generator) discover them
later. Named as a 'natural follow-up' in PR #5's body.
estebanzimanyi
added a commit
that referenced
this pull request
May 20, 2026
Runs the full regenerate path on every PR touching the parser, generator,
meta files, or generate_openapi.py:
- libclang sysroot install (matches MobilityAPI vendor-drift)
- clone MobilityDB master for MEOS headers
- run.py + generate_openapi.py
- openapi-spec-validator against OpenAPI 3.1
- upload meos-openapi.json as an artefact
Catches OpenAPI 3.1 violations the moment a generator change introduces
them, instead of letting downstream consumers (MobilityAPI vendor-drift,
PyMEOS-CFFI codegen, MobilityDuck binding generator) discover them
later. Named as a 'natural follow-up' in PR #5's body.
estebanzimanyi
added a commit
that referenced
this pull request
May 20, 2026
Runs the full regenerate path on every PR touching the parser, generator,
meta files, or generate_openapi.py:
- libclang sysroot install (matches MobilityAPI vendor-drift)
- clone MobilityDB master for MEOS headers
- run.py + generate_openapi.py
- openapi-spec-validator against OpenAPI 3.1
- upload meos-openapi.json as an artefact
Catches OpenAPI 3.1 violations the moment a generator change introduces
them, instead of letting downstream consumers (MobilityAPI vendor-drift,
PyMEOS-CFFI codegen, MobilityDuck binding generator) discover them
later. Named as a 'natural follow-up' in PR #5's body.
estebanzimanyi
added a commit
that referenced
this pull request
May 20, 2026
Runs the full regenerate path on every PR touching the parser, generator,
meta files, or generate_openapi.py:
- libclang sysroot install (matches MobilityAPI vendor-drift)
- clone MobilityDB master for MEOS headers
- run.py + generate_openapi.py
- openapi-spec-validator against OpenAPI 3.1
- upload meos-openapi.json as an artefact
Catches OpenAPI 3.1 violations the moment a generator change introduces
them, instead of letting downstream consumers (MobilityAPI vendor-drift,
PyMEOS-CFFI codegen, MobilityDuck binding generator) discover them
later. Named as a 'natural follow-up' in PR #5's body.
estebanzimanyi
added a commit
that referenced
this pull request
May 20, 2026
Runs the full regenerate path on every PR touching the parser, generator,
meta files, or generate_openapi.py:
- libclang sysroot install (matches MobilityAPI vendor-drift)
- clone MobilityDB master for MEOS headers
- run.py + generate_openapi.py
- openapi-spec-validator against OpenAPI 3.1
- upload meos-openapi.json as an artefact
Catches OpenAPI 3.1 violations the moment a generator change introduces
them, instead of letting downstream consumers (MobilityAPI vendor-drift,
PyMEOS-CFFI codegen, MobilityDuck binding generator) discover them
later. Named as a 'natural follow-up' in PR #5's body.
estebanzimanyi
added a commit
that referenced
this pull request
May 20, 2026
…follow-up)
Adds 'generator/movfeat.py' and 'generate_movfeat_openapi.py' as a
second OpenAPI projection alongside the generic RPC-style projection
in 'generator/openapi.py'.
The MovFeat projection maps the subset of MEOS functions that have an
OGC API – Moving Features (OGC 22-003r3) analogue onto the
OGC-defined REST resource hierarchy under
'/collections/{collectionId}/items/{featureId}/…'. Each route carries
'x-meos-{function,decode,encode}' extensions so a downstream OGC
server (MobilityAPI, in this ecosystem) can dispatch each call to the
right MEOS function without re-deriving the mapping.
Reuses the _value_schema / _type_schema / _enum_schema helpers from
'generator/openapi.py' so component schemas and the MeosError
response are byte-identical across the two projections. Smoke-tested
locally on the catalog produced by 'run.py' against MobilityDB master
headers: 10 paths, 5/6 unique MEOS function dependencies present in
the catalog (temporal_as_mfjson, temporal_from_mfjson, tpoint_speed,
temporal_derivative, tpoint_cumulative_length, tpoint_azimuth).
Closes the 'OGC API – Moving Features resource projection' natural
follow-up named in PR #5's body. The MobilityAPI ingestion plan
(MobilityAPI #3, step 5) consumes this projection.
This was referenced May 21, 2026
estebanzimanyi
added a commit
that referenced
this pull request
Jul 6, 2026
…follow-up)
Adds 'generator/movfeat.py' and 'generate_movfeat_openapi.py' as a
second OpenAPI projection alongside the generic RPC-style projection
in 'generator/openapi.py'.
The MovFeat projection maps the subset of MEOS functions that have an
OGC API – Moving Features (OGC 22-003r3) analogue onto the
OGC-defined REST resource hierarchy under
'/collections/{collectionId}/items/{featureId}/…'. Each route carries
'x-meos-{function,decode,encode}' extensions so a downstream OGC
server (MobilityAPI, in this ecosystem) can dispatch each call to the
right MEOS function without re-deriving the mapping.
Reuses the _value_schema / _type_schema / _enum_schema helpers from
'generator/openapi.py' so component schemas and the MeosError
response are byte-identical across the two projections. Smoke-tested
locally on the catalog produced by 'run.py' against MobilityDB master
headers: 10 paths, 5/6 unique MEOS function dependencies present in
the catalog (temporal_as_mfjson, temporal_from_mfjson, tpoint_speed,
temporal_derivative, tpoint_cumulative_length, tpoint_azimuth).
Closes the 'OGC API – Moving Features resource projection' natural
follow-up named in PR #5's body. The MobilityAPI ingestion plan
(MobilityAPI #3, step 5) consumes this projection.
estebanzimanyi
added a commit
that referenced
this pull request
Jul 6, 2026
Runs the full regenerate path on every PR touching the parser, generator,
meta files, or generate_openapi.py:
- libclang sysroot install (matches MobilityAPI vendor-drift)
- clone MobilityDB master for MEOS headers
- run.py + generate_openapi.py
- openapi-spec-validator against OpenAPI 3.1
- upload meos-openapi.json as an artefact
Catches OpenAPI 3.1 violations the moment a generator change introduces
them, instead of letting downstream consumers (MobilityAPI vendor-drift,
PyMEOS-CFFI codegen, MobilityDuck binding generator) discover them
later. Named as a 'natural follow-up' in PR #5's body.
Adds generator/openapi.py + generate_openapi.py: projects the enriched MEOS catalog (network/wire/typeEncodings from the service-projection pass) onto an OpenAPI 3.1 document.
- one RPC-style POST /{function} per stateless-exposable function
(a function is to MEOS what a process is to OGC API - Processes)
- opaque values cross the wire as strings in their typeEncodings
(text/MF-JSON/HexWKB), surfaced as reusable component schemas
- enums become string component schemas with the real C constant names
- x-meos-{category,decode,encode,in,out,encodings} make the document
self-describing for a downstream server/MCP/gRPC generator
- pure dict -> dict (no libclang, no MEOS runtime), deterministic output
Logically depends on the catalog being enriched. Validated against the
live MobilityDB master catalog: 2672 functions -> 1790 operations over
14 component schemas, all $refs resolve. Documented in docs/openapi.md;
tested in tests/test_openapi.py (stdlib unittest).
Uh oh!
There was an error while loading. Please reload this page.
estebanzimanyi
added a commit
that referenced
this pull request
Jul 7, 2026
Runs the full regenerate path on every PR touching the parser, generator,
meta files, or generate_openapi.py:
- libclang sysroot install (matches MobilityAPI vendor-drift)
- clone MobilityDB master for MEOS headers
- run.py + generate_openapi.py
- openapi-spec-validator against OpenAPI 3.1
- upload meos-openapi.json as an artefact
Catches OpenAPI 3.1 violations the moment a generator change introduces
them, instead of letting downstream consumers (MobilityAPI vendor-drift,
PyMEOS-CFFI codegen, MobilityDuck binding generator) discover them
later. Named as a 'natural follow-up' in PR #5's body.
estebanzimanyi
added a commit
that referenced
this pull request
Jul 7, 2026
Runs the full regenerate path on every PR touching the parser, generator,
meta files, or generate_openapi.py:
- libclang sysroot install (matches MobilityAPI vendor-drift)
- clone MobilityDB master for MEOS headers
- run.py + generate_openapi.py
- openapi-spec-validator against OpenAPI 3.1
- upload meos-openapi.json as an artefact
Catches OpenAPI 3.1 violations the moment a generator change introduces
them, instead of letting downstream consumers (MobilityAPI vendor-drift,
PyMEOS-CFFI codegen, MobilityDuck binding generator) discover them
later. Named as a 'natural follow-up' in PR #5's body.
estebanzimanyi
added a commit
that referenced
this pull request
Jul 7, 2026
Runs the full regenerate path on every PR touching the parser, generator,
meta files, or generate_openapi.py:
- libclang sysroot install (matches MobilityAPI vendor-drift)
- clone MobilityDB master for MEOS headers
- run.py + generate_openapi.py
- openapi-spec-validator against OpenAPI 3.1
- upload meos-openapi.json as an artefact
Catches OpenAPI 3.1 violations the moment a generator change introduces
them, instead of letting downstream consumers (MobilityAPI vendor-drift,
PyMEOS-CFFI codegen, MobilityDuck binding generator) discover them
later. Named as a 'natural follow-up' in PR #5's body.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|