README
Configured README examples, checked against the methods actually generated because the README is code that has to compile, and configured sections, checked so they render without disturbing the document around them.
| Rule | Default | Summary |
|---|---|---|
Readme/InvalidParameter |
warn |
A README example passes a parameter its endpoint does not accept. |
Readme/InvalidSection |
error |
A configured README section cannot be rendered safely; downgraded, it is left out. |
Readme/UnknownEndpoint |
warn |
A README example names an endpoint no generated method matches. |
Readme/UnknownResponseProperty |
warn |
A README example prints a response property the endpoint does not return. |
Readme/InvalidParameter
A README example passes a parameter its endpoint does not accept.
| Default severity | Fix lives in |
|---|---|
warn |
Your SDK configuration (config) |
When it fires
An example passes a parameter the endpoint does not declare, or a value its schema rules out. Parameters are rendered exactly as written, so a stale one documents a call the API rejects. An errors section that shows an invalid value on purpose is the case to suppress rather than fix.
Changing or silencing it
Each finding's suppression key is <exampleKey>.<parameter>.
Re-grade the rule with diagnostics.rules, or silence findings with diagnostics.ignored, matching their suppression key exactly or with * as a wildcard:
{
"diagnostics": {
"rules": {
"Readme/InvalidParameter": "info"
},
"ignored": {
"Readme/InvalidParameter": "<suppression key>"
}
}
}
Readme/InvalidSection
A configured README section cannot be rendered safely; downgraded, it is left out.
| Default severity | Fix lives in |
|---|---|
error |
Your SDK configuration (config) |
When it fires
A readme.sections entry cannot be rendered without changing the document around it. Generation fails at the default severity; downgraded, the section is left out of every README. It covers a blank title or body, a title that shares an anchor with the README's heading, a title, body heading or HTML id/name that shares an anchor with a heading any target's README generates or with another configured section, and a body that could reach past its section: an open or misplaced code fence, unclosed or ambiguous raw HTML, a #/## heading, a footnote definition, or an indented code block. The finding's message names every problem the section has.
Changing or silencing it
Each finding's suppression key is the entry's index in sections, such as 0.
Re-grade the rule with diagnostics.rules, or silence findings with diagnostics.ignored, matching their suppression key exactly or with * as a wildcard:
{
"diagnostics": {
"rules": {
"Readme/InvalidSection": "warn"
},
"ignored": {
"Readme/InvalidSection": "<suppression key>"
}
}
}
Readme/UnknownEndpoint
A README example names an endpoint no generated method matches.
| Default severity | Fix lives in |
|---|---|
warn |
Your SDK configuration (config) |
When it fires
An example's endpoint names no method this SDK generates, so the whole entry is dropped and the section falls back to a derived example.
Changing or silencing it
Each finding's suppression key is the exampleRequests key, such as default.
Re-grade the rule with diagnostics.rules, or silence findings with diagnostics.ignored, matching their suppression key exactly or with * as a wildcard:
{
"diagnostics": {
"rules": {
"Readme/UnknownEndpoint": "info"
},
"ignored": {
"Readme/UnknownEndpoint": "<suppression key>"
}
}
}
Readme/UnknownResponseProperty
A README example prints a response property the endpoint does not return.
| Default severity | Fix lives in |
|---|---|
warn |
Your SDK configuration (config) |
When it fires
An example prints a response property the endpoint does not return, which ships a README snippet that does not compile in every language that renders it.
Changing or silencing it
Each finding's suppression key is <exampleKey>.<property>.
Re-grade the rule with diagnostics.rules, or silence findings with diagnostics.ignored, matching their suppression key exactly or with * as a wildcard:
{
"diagnostics": {
"rules": {
"Readme/UnknownResponseProperty": "info"
},
"ignored": {
"Readme/UnknownResponseProperty": "<suppression key>"
}
}
}
See also
- Diagnostics: how findings are graded, located and suppressed
- Severity and failing the build
- Suppressing a finding
What did you think of this content?