common-workflow-language / common-workflow-language/schema_salad
`--print-pre` inserts an identifier field of other unused type
- Langage dominant
- Python
- Étoiles
- 86
- Forks
- 64
- Merge moyen
- 19 h 24 min
- PR mergées (30 j)
- 19
Description
I could not find descriptions that support this behavior.
Is it a bug of schema-salad-tool or an undocumented specification, or am I missing something?
# Input schema and document to be preprocessed
- schema.json
```json
{
"$namespaces": {
"acid": "http://example.com/acid#"
},
"$graph": [
{
"name": "RootType",
"type": "record",
"documentRoot": true,
"fields": [
{
"name": "id",
"type": "string"
}
]
},
{
"name": "UnusedType",
"type": "record",
"fields": [
{
"name": "unused_id",
"type": "string",
"jsonldPredicate": "@id"
}
]
}
]
}
```
- example.json
```json
{
"id": "foo"
}
```
# How to reproduce
```console
$ schema-salad-tool --print-pre schema.json example.json
```
# Expected behavior
Input document is printed as a preprocessed document.
```console
$ schema-salad-tool --print-pre schema.json example.json
...
{
"id": "foo"
}
```
# Actual behavior
Input document with `unused_id` field is printed as a preprocessed document.
```console
$ schema-salad-tool --print-pre schema.json example.json
...
{
"id": "foo",
"unused_id": "file:///home/tom-tan/example/example.json"
}
```
# Version
```console
$ schema-salad-tool --version
/home/tom-tan/.local/bin/schema-salad-tool Current version: 7.1.20210518142926
```
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.