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

Change default format from jsonv2 to geocodejson for /search endpoint #2

Closed
jenkin opened this issue Jul 20, 2023 · 0 comments · Fixed by #10
Closed

Change default format from jsonv2 to geocodejson for /search endpoint #2

jenkin opened this issue Jul 20, 2023 · 0 comments · Fixed by #10
Labels
enhancement New feature or request hacktoberfest

Comments

@jenkin
Copy link
Collaborator

jenkin commented Jul 20, 2023

Is your feature request related to a problem? Please describe.
Right now the official default format value for the /search endpoint is jsonv2 (see documentation) and the spec describes this response. But this discussion suggests that the best output format is geocodejson described by this spec.

Describe the solution you'd like
Change default format value of the OpenAPI spec to geocodejson and describe only this output in json schema. We should find or write the json schema for the geocodejson spec, but it is an extension of GeoJSON that already has an official json schema.

Describe alternatives you've considered
We can strictly follow the Nominatim documentation, but jsonv2 format has several well-known drawbacks and probably the next v2 of the api will drop it.

Additional context
Some useful resources:

@jenkin jenkin added enhancement New feature or request good first issue Good for newcomers labels Jul 20, 2023
@jenkin jenkin removed the good first issue Good for newcomers label Jul 20, 2023
@jenkin jenkin changed the title Change default formato from jsonv2 to geocodejson for /search endpoint Change default format from jsonv2 to geocodejson for /search endpoint Oct 2, 2023
jenkin added a commit that referenced this issue Oct 2, 2023
Define GeocodeJSON json schema for both `search` and `lookup` endpoints and clean now useless schemas.

Refs: #2
@jenkin jenkin linked a pull request Oct 2, 2023 that will close this issue
jenkin added a commit that referenced this issue Oct 3, 2023
Reference GeoJSON schema to define the GeocodeJSON one. Put it in a standalone file and reference it inside the OpenAPI spec.

Refs: #2
jenkin added a commit that referenced this issue Oct 3, 2023
Add `make validate` utility using `@apidevtools/swagger-cli` to validate OpenAPI spec.

Add `make bundle` utility to dereference and minify OpenAPI spec and JSON schema.

New dependency: `npx`.

Refs: #2
jenkin added a commit that referenced this issue Oct 3, 2023
Now checksums are computed (pre-commit) and checked (pre-push) for both OpenAPI spec and JSON schema and their minified versions.

Refs: #2
jenkin added a commit that referenced this issue Oct 3, 2023
Swagger UI now loads the minified OpenAPI spec.

Swagger Editor (latest version) doesn't support custom spec passed with envars or url parameters (see [swagger-editor/issues/4411](swagger-api/swagger-editor#4411)).

Refs: #2
jenkin added a commit that referenced this issue Oct 4, 2023
Move OSM specific attributes out of GeocodeJSON schema.

Refs: #2
@jenkin jenkin closed this as completed in #10 Nov 6, 2023
jenkin added a commit that referenced this issue Nov 6, 2023
Define GeocodeJSON json schema for both `search` and `lookup` endpoints and clean now useless schemas.

Refs: #2
jenkin added a commit that referenced this issue Nov 6, 2023
Reference GeoJSON schema to define the GeocodeJSON one. Put it in a standalone file and reference it inside the OpenAPI spec.

Refs: #2
jenkin added a commit that referenced this issue Nov 6, 2023
Add `make validate` utility using `@apidevtools/swagger-cli` to validate OpenAPI spec.

Add `make bundle` utility to dereference and minify OpenAPI spec and JSON schema.

New dependency: `npx`.

Refs: #2
jenkin added a commit that referenced this issue Nov 6, 2023
Now checksums are computed (pre-commit) and checked (pre-push) for both OpenAPI spec and JSON schema and their minified versions.

Refs: #2
jenkin added a commit that referenced this issue Nov 6, 2023
Swagger UI now loads the minified OpenAPI spec.

Swagger Editor (latest version) doesn't support custom spec passed with envars or url parameters (see [swagger-editor/issues/4411](swagger-api/swagger-editor#4411)).

Refs: #2
jenkin added a commit that referenced this issue Nov 6, 2023
Move OSM specific attributes out of GeocodeJSON schema.

Refs: #2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant