Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 39 additions & 4 deletions publiccode-validator-api.oas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -270,14 +270,14 @@ components:
properties:
valid:
type: boolean
description: Whether the file passed validation with no errors
description: >
Whether the file passed validation. False when any entry of
results has type error. Warnings alone keep it true.
results:
type: array
description: List of validation issues (warnings and errors)
items:
type: object
description: A validation issue
additionalProperties: true
$ref: "#/components/schemas/ValidationResult"
normalized:
description: >
Normalized publiccode.yml content, present only when
Expand All @@ -286,6 +286,41 @@ components:
- type: string
- type: "null"

ValidationResult:
description: A validation issue
type: object
required: [file, key, description, line, column, type]
properties:
file:
type: string
description: >
Name of the validated file. Always empty, since the file
is sent in the request body.
key:
type: string
description: >
Dotted path of the key the issue refers to, such as
legal.license. Empty for issues about the whole file.
example: legal.license
description:
type: string
description: Human-readable description of the issue
example: license is a required field
line:
type: integer
format: int32
description: Line of the issue, 1-based. 0 when unknown
minimum: 0
column:
type: integer
format: int32
description: Column of the issue, 1-based. 0 when unknown
minimum: 0
type:
type: string
description: Whether the issue is an error or a warning
enum: [error, warning]

ProblemJSON:
description: Error response following RFC 9457 (Problem Details for HTTP APIs)
type: object
Expand Down
Loading