Open
Conversation
f6559f6 to
86ced57
Compare
Signed-off-by: Ahmed Mohamed <ahmed.mohamed@motius.de>
Signed-off-by: Ahmed Mohamed <ahmed.mohamed@motius.de>
Signed-off-by: Ahmed Mohamed <ahmed.mohamed@motius.de>
Signed-off-by: Ahmed Mohamed <ahmed.mohamed@motius.de>
86ced57 to
04c5d7d
Compare
jdacoello
requested changes
Mar 24, 2026
Collaborator
jdacoello
left a comment
There was a problem hiding this comment.
Following remarks:
- Fields that resolve to built-in
IDscalar must haveidentifier: true
type SomeTypeName {
id: ID!
...
}# Current
SomeTypeName:
attributes:
id:
range: string
required: true# Should be
SomeTypeName:
attributes:
id:
range: string
required: true
identifier: true- Exclude
Queryandinputtypes
type Query {
vehicle: Vehicle
}
input KeyValue {
key: String!
value: String!
} # Currently present
Query:
attributes:
vehicle:
range: Vehicle
KeyValue:
description: Key-value pair for storing metadata.
attributes:
key:
range: string
required: true
value:
range: string
required: true- All top-level concepts should be declared as
tree_root: true
type Vehicle {
...
}Vehicle:
tree_root: true
...Same for other top level concepts. I think we have already a function that returns the top level concepts (i.e., all roots) from a GraphQL schema.
- Fix handling of units
Right now, the units are passed as seen.
ambientAirTemperature(unit: TemperatureUnitEnum = DEGREE_CELSIUS): Float
enum TemperatureUnitEnum {
DEGREE_CELSIUS
DEGREE_FAHRENHEIT
}temperature:
range: float
unit:
symbol: DEGREE_CELSIUS # ← enum value name used as-is, no URIsIt seems that the linkml tools expect compatible ones because some tools complain, eg.,:
linkml generate doc <spec-in-linkml.yaml> -d <directory>
TypeError: unhashable type: 'UnitOfMeasure'- If custom unit is used, the linkml tools should be able to run (e.g., doc)
When annotation of reference is given, then reflect it, such as:
enum TemperatureUnit @reference(uri: "http://qudt.org/vocab/quantitykind/Temperature") {
DEG_C @reference(uri: "http://qudt.org/vocab/unit/DEG_C")
DEG_F @reference(uri: "http://qudt.org/vocab/unit/DEG_F")
}
type SomeType {
ambientAirTemperature(unit: TemperatureUnit = DEG_C): Float
}...
TemperatureUnitEnum:
description: Units for "temperature"
permissible_values:
DEG_C:
meaning: http://qudt.org/vocab/unit/DEG_C
DEG_F:
meaning: http://qudt.org/vocab/unit/DEG_F
...
# every attribute that uses unit
ambientAirTemperature:
range: float
unit:
symbol: DEG_C
exact_mappings:
- http://qudt.org/vocab/unit/DEG_C
This file contains hidden or 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
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 is based on #168 and implements LinkML exporter.
s2dm export linkml \ --schema /path/to/schema \ --output output.yaml \ --id schema_id \ --name schema_name \ --default-prefix default_prefix \ --default-prefix-url default_prefix_url