Add $schema prop to drc/erc
This commit is contained in:
parent
7e89d9dee2
commit
f73d45b0cf
|
@ -115,6 +115,7 @@ bool ERC_REPORT::WriteJsonReport( const wxString& aFullFileName )
|
|||
|
||||
RC_JSON::ERC_REPORT reportHead;
|
||||
wxFileName fn( m_sch->GetFileName() );
|
||||
reportHead.$schema = "https://schemas.kicad.org/erc.v1.json";
|
||||
reportHead.source = fn.GetFullName();
|
||||
reportHead.date = GetISO8601CurrentDateTime();
|
||||
reportHead.kicad_version = GetMajorMinorPatchVersion();
|
||||
|
|
|
@ -78,6 +78,7 @@ inline void from_json( const nlohmann::json& aJson, VIOLATION& aViolation )
|
|||
|
||||
struct REPORT_BASE
|
||||
{
|
||||
wxString $schema;
|
||||
wxString source;
|
||||
wxString date;
|
||||
wxString kicad_version;
|
||||
|
@ -94,7 +95,7 @@ struct DRC_REPORT : REPORT_BASE
|
|||
std::vector<VIOLATION> schematic_parity;
|
||||
};
|
||||
|
||||
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE( DRC_REPORT, source, date, kicad_version, violations,
|
||||
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE( DRC_REPORT, $schema, source, date, kicad_version, violations,
|
||||
unconnected_items, schematic_parity, coordinate_units )
|
||||
|
||||
struct ERC_SHEET
|
||||
|
@ -113,7 +114,7 @@ struct ERC_REPORT : REPORT_BASE
|
|||
std::vector<ERC_SHEET> sheets;
|
||||
};
|
||||
|
||||
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE( ERC_REPORT, source, date, kicad_version, sheets,
|
||||
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE( ERC_REPORT, $schema, source, date, kicad_version, sheets,
|
||||
coordinate_units )
|
||||
|
||||
} // namespace RC_JSON
|
||||
|
|
|
@ -123,6 +123,7 @@ bool DRC_REPORT::WriteJsonReport( const wxString& aFullFileName )
|
|||
RC_JSON::DRC_REPORT reportHead;
|
||||
|
||||
wxFileName fn( m_board->GetFileName() );
|
||||
reportHead.$schema = "https://schemas.kicad.org/drc.v1.json";
|
||||
reportHead.source = fn.GetFullName();
|
||||
reportHead.date = GetISO8601CurrentDateTime();
|
||||
reportHead.kicad_version = GetMajorMinorPatchVersion();
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"type": "string",
|
||||
"description": "JSON schema reference"
|
||||
},
|
||||
"source": {
|
||||
"type": "string",
|
||||
"description": "Source file path"
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"type": "string",
|
||||
"description": "JSON schema reference"
|
||||
},
|
||||
"source": {
|
||||
"type": "string",
|
||||
"description": "Source file path"
|
||||
|
|
Loading…
Reference in New Issue