-
Notifications
You must be signed in to change notification settings - Fork 8
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/fhir json schema + Remove Elasticsearch support from Grip #318
Open
matthewpeterkort
wants to merge
22
commits into
develop
Choose a base branch
from
feature/fhir-json-schema
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (server *GripServer) LoadSchemas(project_id string, sch *gripql.Graph, out *graph.GraphSchema) (*graph.GraphSchema, error) { | ||
schcompiler := jsonschema.NewCompiler() | ||
schcompiler.ExtractAnnotations = true | ||
schcompiler.RegisterExtension(compile.GraphExtensionTag, compile.GraphExtMeta, compile.GraphExtCompiler{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our graph extension is hard coded into the loader here. An extension argument could get abstracted out as an argument to the load schema protobuf method.
matthewpeterkort
changed the title
[WIP] Feature/fhir json schema
Feature/fhir json schema + Remove Elasticsearch support from Grip
Nov 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR does a few things:
Add support for storing jsonschema as a grip graph
grip schema post --graphName CALIPER --jsonSchema test.json
The protobuf for this is defined as:
Add support for loading FHIR json directly into grip via new proto method:
grip caliperload schema-test/Observation.ndjson CALIPER test-data2
Note also BulkJsonEditResult is also added, adding support for returning messages back to the client so that an HTTP code can be generated from the error messages or the lack of error messages.
Reorganize schema files into schema dir. Those files were previously in gripql directory.
Also removes all instances of elasticSearch from Grip. This include the website too.
Add support for graphql schema generation as a grip graph from jsonschema with
grip schema graphql --graphName CALIPER --jsonSchema test.json
where graphName is the name of the graph that you want to create a schema for and
--jsonSchema is the jsonschema file that you want to use. ex: https://raw.githubusercontent.com/bmeg/iceberg/refs/heads/feature/FHIR-resource-type/schemas/graph/graph-fhir.json
This is more of an experimental feature that has no direct application at the moment but could be built out in the grip-graphql plugin side to be made useful.