create schema for `CAPI2` core format
See original GitHub issueIt would be nice to have a schema for defining constraint of the fields defining the CAPI2
core format.
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Writing core files - FuseSoC Documentation - Read the Docs
Core files are written in YAML syntax and follow the FuseSoC's own CAPI (version 2) schema, which describes the structure of core files...
Read more >Create schema documents for the Common Data Model
To do so, you'll need to create Common Data Model schema documents. ... entities will represent your data in the Common Data Model...
Read more >Solved: Event Id 4107 CAPI2 Repeating - Experts Exchange
Description: Reached crypt32 threshold of 50 events and will suspend logging for 60 minutes. Event Xml: <Event xmlns="http://schemas.microsoft ...
Read more >Citrix Federated Authentication Service (SAML) 2212
Certificates created using the Microsoft CA certificate template named Domain Controller Authentication ... In the Core Components page, click Next.
Read more >CREATE SCHEMA
The CREATE SCHEMA statement creates a named collection of database objects. The CREATE SCHEMA statement has the following format:.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I tried for a while to mess with dataclasses for config files and they’re pretty annoying because you have to implement all the validation/transformations in a more verbose way than pydantic. Not only this, but serializing config files isn’t as easy as this with dataclass like pydantic supports:
It looks like datamodel-code-generator can generate pydantic models directly from JSON schema to actually validate core files at runtime. I’m not sure how good datamodel-code-generator is, but IMO, I think starting with pydantic basemodel as your code is already python makes sense because you can just export the model to JSON for anyone who wants the schema. I believe that pydantic also has a dataclass identical to the standard lib capable of validation as well.
EDIT: just wanted to provide some ideas as I spent more time than I’d like to admit to test different tools to figure out how to validate config files, document extensively how to write them for users, and also provide extensive documentation about the actual code that parses for devs.
Yep, this and
dataclasses
also got mentioned in https://github.com/olofk/edalize/issues/288.That would be a good way to piggy back on the existing python tooling for doc generation.