AlgebraicJulia / AlgebraicJulia/ACSets.jl
JSON Schema only use `$def` for selected types, need better way to reference other files
- 主要语言
- Julia
- 星标
- 36
- 派生
- 11
- PR 合并指标
- 30 天内没有已合并 PR
描述
If I validate an object against a JSON Schema, it will check all `$def`s. This behavior ends up being too permissive since some types will be objects with arbitrary fields due to the `Object` InterType. This means nearly _any_ JSON will validate against it which defeats the purpose of a JSON Schema.
A solution to this may be just selecting the InterTypes you want for the JSON Schema using its specific `generate_module` method's kwargs:
```
generate_module(mod, JSONTarget; exposed_intertypes=[:SomeType, :AnotherType])
```
Note that this isn't a problem with Pydantic since the constructor is called explicitly.
(Encountered this problem when reviewing [this PR](https://github.com/AlgebraicJulia/ACSets.jl/pull/96))
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。