oxidecomputer / oxidecomputer/typify
Failing schema: unhandled array validation
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 898
- Forks
- 114
- Avg merge
- 4h 18m
- Merged PRs (30d)
- 14
Description
The schema is here: https://github.com/jgm/djot.js/blob/baa4d3e62bccaebe0680adea1b185adbd211fd8a/djot-schema.json , and is AFAIK automatically generated using typescript-json-schema.
The output of cargo typify is
cargo typify --output src/types.rs djot.js/djot-schema.json
Error:
0: Failed to convert JSON Schema to Rust code
1: Could not add ref types from the 'definitions' field in the JSON Schema
2: schema invalid: unhandled array validation ArrayValidation {
items: Some(
Vec(
[
Object(
SchemaObject {
metadata: None,
instance_type: None,
format: None,
enum_values: None,
const_value: None,
subschemas: None,
number: None,
string: None,
array: None,
object: None,
reference: Some(
"#/definitions/Caption",
),
extensions: {},
},
),
],
),
),
additional_items: Some(
Object(
SchemaObject {
metadata: None,
instance_type: None,
format: None,
enum_values: None,
const_value: None,
subschemas: None,
number: None,
string: None,
array: None,
object: None,
reference: Some(
"#/definitions/Row",
),
extensions: {},
},
),
),
max_items: None,
min_items: Some(
1,
),
unique_items: None,
contains: None,
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with cargo typify --output src/types.rs djot.js/djot-schema.json using the referenced djot-schema.json. Start by tracing handling of the array validation shown in the error, and consider the work complete when the schema converts successfully into src/types.rs without the unhandled array validation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100