(operation: Mapping[str, object])
| 40 | |
| 41 | |
| 42 | def _operation_codes(operation: Mapping[str, object]) -> Iterator[str]: |
| 43 | if not _content_schema(operation.get("requestBody")): |
| 44 | yield "OA001" |
| 45 | description: Final = operation.get("description") |
| 46 | if not isinstance(description, str) or not description.strip(): |
| 47 | yield "OA002" |
| 48 | if not _content_schema(_as_mapping(operation.get("responses")).get("200")): |
| 49 | yield "OA003" |
| 50 | |
| 51 | |
| 52 | def violations(spec: Mapping[str, object]) -> tuple[Violation, ...]: |
no test coverage detected