The "@id" fields cause problems, rename to "id"
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 45/100
- Tipo di issue
- Refactoring
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- documentation
Direzione di ricerca
Look for '@id' field definitions in the metadata schema files. Understand the schema structure and where these fields are used. Check for any validation or processing that depends on the '@id' naming. Rename occurrences to 'id' and ensure the schema remains valid.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description of the issue
OEMetadata instance documents use @id wherever a resource — usually an ontology term — is referenced. The @ prefix creates concrete friction for consumers:
- JSONPath (RFC 9535) reserves @ as the current-node identifier, so $.subject[*].@id is not expressible. Every extraction rule needs bracket notation.
- GraphQL field names must match /[_A-Za-z][_0-9A-Za-z]*/. @id is illegal as a field name, which blocks a GraphQL surface over OEMetadata.
- @ is not a valid identifier character in most languages. Generated models need explicit alias declarations (Field(alias="@id") in Pydantic); JS/TS destructuring becomes awkward.
- YAML reserves @ as an indicator character, so the key must be quoted in any YAML representation.
Ideas of solution
Alias the keyword in the context. Instance documents then write id, and the emitted RDF is unchanged:
"@context": { "id": "@id", ... }
Keyword aliasing exists for exactly this purpose and is standard practice in the JSON-LD ecosystem.
This affects @id in instance documents only. Occurrences inside context term definitions — "publicationYear": {"@id": "fabio:hasPublicationYear"} — are unaffected, because aliased keywords may not be used within a context itself. These are confined to the single context file and never appear in user-authored metadata.
Data Package reserves a root-level id for globally unique identifiers and explicitly permits non-IRI values such as bare UUIDs. If OEMetadata inherits that field unchanged, aliasing id to @id would silently reinterpret such values as relative IRIs resolved against the document base.
Workflow checklist
- I am aware of the workflow in CONTRIBUTING.md
- Lingua principale
- Python
- Stelle
- 26
- Fork
- 4
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenEnergyPlatform/oemetadata
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
OpenEnergyPlatform/oemetadata#328 ·
-
Develop AI tooling for usersAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
OpenEnergyPlatform/oemetadata#327 · 1 commento ·
-
Codecov workflow fails on every develop push: frictionless not installedForse già presa @jh-RLI l’ha presa 52 giorni fa. Apertapart: github :octocat: status: active 🚧 type: bug 🐛
OpenEnergyPlatform/oemetadata#325 · 1 assegnatario ·
-
status: active 🚧 type: bug 🐛
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
OpenEnergyPlatform/oemetadata#323 · 1 reazione ·
-
Revise and update testsForse già presa @jh-RLI l’ha presa 52 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
OpenEnergyPlatform/oemetadata#316 · 1 commento · 3 assegnatari ·
Tutte le issue di OpenEnergyPlatform/oemetadata
Issue simili
-
needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
flashinfer-ai/flashinfer#9803 ·
I maintainer di solito rispondono entro 1 giorno
-
bug frontend good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
oscarbol09/thesisforge#61 ·
-
api bug performance
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
oscarbol09/audiobard#159 ·
-
area:web p2 product:business triage:active type:bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 89/100
cuadrao-ai/argus#2328 ·
I maintainer di solito rispondono entro 1 giorno
-
bug frontend good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
nikhilb2/simple_invoicing#907 ·