Skip to content

Place geojson schema at right place #711

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

Closed
wants to merge 3 commits into from

Conversation

arjxn-py
Copy link
Member

@arjxn-py arjxn-py commented May 20, 2025

Description

#710

Checklist

  • PR has a descriptive title and content.
  • PR description contains references to any issues the PR resolves, e.g. Resolves #XXX.
  • PR has one of the labels: documentation, bug, enhancement, feature, maintenance
  • Checks are passing.
    Failing lint checks can be resolved with:
    • pre-commit run --all-files
    • jlpm run lint

📚 Documentation preview: https://jupytergis--711.org.readthedocs.build/en/711/
💡 JupyterLite preview: https://jupytergis--711.org.readthedocs.build/en/711/lite

@arjxn-py arjxn-py marked this pull request as draft May 20, 2025 09:40
Copy link
Contributor

Binder 👈 Launch a Binder on branch arjxn-py/jupytergis/gjson-schema

@arjxn-py arjxn-py added the bug Something isn't working label May 20, 2025
@@ -12,7 +12,7 @@
"data": {
"type": "object",
"description": "The GeoJSON data",
"$ref": "./geojson.json"
Copy link
Member

Choose a reason for hiding this comment

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

Should still be "./geojson.json" since it's located next to it?

Copy link
Member

Choose a reason for hiding this comment

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

You were right using "./project/sources/geojson.json" it seems, because we use cwd as ./src/schema in here https://github.com/geojupyter/jupytergis/blob/main/packages/schema/package.json#L30

Copy link
Member

Choose a reason for hiding this comment

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

But it seems datamodel-codegen prefers "$ref": "./geojson.json", which, to be fair, makes more sense

Copy link
Member

Choose a reason for hiding this comment

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

Dude 😓 "$ref": "./geojson.json" is the correct approach IMO. datamodel-codegen agrees.

But json2ts does not like that bcherny/json-schema-to-typescript#324

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

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

I see another place that needs to be changed?

import * as geojson from '@jupytergis/schema/src/schema/geojson.json';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants