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

TileJSONExtended implementation #773

Closed
wants to merge 2 commits into from

Conversation

Perdjesk
Copy link
Contributor

@Perdjesk Perdjesk commented Sep 5, 2023

Alternative of #772

Derived from TileJSON specification a tiles-extended.json with cherry-picked (i.e allow list) baremaps metadata fields out of tileset.json configuration file.

// POJO for baremaps-core and baremaps-server (all content is deserialized)
Tileset.class
// POJO strictly following TileJSON specifications for API clients.
TileJSON.class
// POJO following TileJSON with extended fields specific to baremaps
TileJSONExtended.class

In this PR tiles.json is always the TileJSON spec. And tiles-extended.json is only available in dev server. However the following options can be easily decided:

  • Whether to provide TileJSONExtended in prod
  • Whether to serve TileJSONExtended in place of tiles.json or separately tiles-extended.json

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Perdjesk
Copy link
Contributor Author

Perdjesk commented Sep 5, 2023

Given some thoughts to it, I would propose the following:

Always expose in the API TileJSONExtended as a separated resource tiles-extended.json as there must be nothing confidential in this file and it should be enforce by review of additions in classes.
Always expose in the API TileJSON as tiles.json.

Pros:

  • Remove discrepancies between dev/prod mode.
  • Only consume extended version willingly.
  • Avoid potential clashes with clients implementations not supporting tiles.json with additional properties.

@bchapuis bchapuis closed this Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants