Stable JSON serialization for hypermedia contract check results.
contracts.serialize
| Name | Type | Default | Description |
|---|---|---|---|
type
|
|
— | |
qualified_name
|
|
— | |
element_type
|
|
— | |
description
|
|
— | |
source_file
|
|
— | |
line_number
|
|
— | |
is_autodoc
|
|
— | |
autodoc_element
|
|
— | |
_autodoc_template
|
|
— | |
_autodoc_url_path
|
|
— | |
_autodoc_page_type
|
|
— | |
title
|
|
— | |
doc_content_hash
|
|
— |
Symbols on this page
function
issue_fingerprint
function
issue_to_dict
function
result_to_dict
function
coverage_to_dict
Deterministic identity for diffing issues across runs.
Serialize one issue for JSON baselines.
Serialize aCheckResult for chirp check --jsonbaselines.
Serialize coverage counters without changing default CLI JSON.
issue_fingerprint
function
def issue_fingerprint(issue: ContractIssue) -> tuple[str, str, str, str, str]
Deterministic identity for diffing issues across runs.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
issue
|
ContractIssue
|
— |
issue_to_dict
function
def issue_to_dict(issue: ContractIssue) -> dict[str, Any]
Serialize one issue for JSON baselines.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
issue
|
ContractIssue
|
— |
result_to_dict
function
def result_to_dict(result: CheckResult, *, include_info: bool = False, include_coverage: bool = False) -> dict[str, Any]
Serialize aCheckResult for chirp check --jsonbaselines.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
result
|
CheckResult
|
— | |
include_info
|
bool
|
False
|
|
include_coverage
|
bool
|
False
|
coverage_to_dict
function
def coverage_to_dict(coverage: ContractCoverage) -> dict[str, int]
Serialize coverage counters without changing default CLI JSON.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
coverage
|
ContractCoverage
|
— |
View source · /home/runner/work/chirp/chirp/site/../src/chirp/contracts/serialize.py:1