llama-stack-mirror/docs/openapi_generator/pyopenapi
Sébastien Han 7fc5faf793
fix: return 4xx for non-existent resources in GET requests
- Removed Optional return types for GET methods
- Raised ValueError when requested resource is not found
- Ensures proper 4xx response for missing resources
- Updated the API generator to check for wrong signatures

```
$ uv run --with ".[dev]" ./docs/openapi_generator/run_openapi_generator.sh
Validating API method return types...

API Method Return Type Validation Errors:

Method ScoringFunctions.get_scoring_function returns Optional type
```

Closes: https://github.com/meta-llama/llama-stack/issues/1630
Signed-off-by: Sébastien Han <seb@redhat.com>
2025-03-18 20:32:43 +01:00
..
__init__.py move openapi from rfcs->docs 2024-09-18 16:09:17 -07:00
generator.py feat(api): (1/n) datasets api clean up (#1573) 2025-03-17 16:55:45 -07:00
operations.py fix: some telemetry APIs don't currently work (#1188) 2025-02-20 14:09:25 -08:00
options.py feat: enhance OpenAPI spec to include Error types (#1320) 2025-02-28 11:16:12 -08:00
README.md move openapi from rfcs->docs 2024-09-18 16:09:17 -07:00
specification.py feat: adding endpoints for files and uploads (#1070) 2025-02-20 13:09:00 -08:00
template.html fix: update CDN url for stoplight 2025-03-14 15:46:45 -07:00
utility.py fix: return 4xx for non-existent resources in GET requests 2025-03-18 20:32:43 +01:00