OpenAPITools / OpenAPITools/openapi-generator
[REQ] Provide Validation-Only Utility Functions
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
I'm using OpenAPI doc to populate an AWS API Gateway, however API Gateway provides very limited validation capabilities, which do not include for example pattern checking for parameter values. As a result, I'm implementing additional validation manually within Lambda functions triggered off of Gateway endpoints. The generated code (Python, in my case) is clearly not designed for validation-only use case. The generated code expects to be the client to a server implementing this interface and only provides easily-used functions for sending request to an endpoint, not the intermediary steps like validation before send.
Describe the solution you'd like
Utility functions on models and parameters defined at the API level to validate value against prescribed type/validation from OpenAPI doc.
Describe alternatives you've considered
I'm evaluating use of the validation details in generated DefaultApi and the business logic in default_api, but the code is clearly not designed for validation-only use case.
Additional context
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The request mentions generated Python code, DefaultApi, and default_api; begin by examining how their existing validation details relate to model and parameter definitions from the OpenAPI document. Clarify the validation-only scope and completion criteria with maintainers, then locate the relevant generator tests; the issue names no specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, openapi, python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100