swagger-api / swagger-api/swagger-codegen
format_test.py error is not intelligible
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
When using the swagger codegen to generate code from an OpenAPI spec, it produces an error message when a regular expression has been used to limit which characters can be used for a value.
The error reads "must be a follow pattern or equal to ". I am objecting to the wording of 'follow pattern'. What is a 'follow pattern'? My guess is that this was supposed to say, 'must follow a pattern or be equal to <...>'. But that is only a guess.
The code is here.
https://github.com/swagger-api/swagger-codegen/blob/master/samples/client/petstore/python/petstore_api/models/format_test.py#L273
Swagger-codegen version
3.3.4
Swagger declaration file content or url
Suggest a fix/enhancement
Is 'follow pattern' a real term? If not, can we simply reword this error to be more intelligible?
The error reads "must be a follow pattern or equal to ". I am objecting to the wording of 'follow pattern'. What is a 'follow pattern'? My guess is that this was supposed to say, 'must follow a pattern or be equal to <...>'. But that is only a guess.
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
Start at samples/client/petstore/python/petstore_api/models/format_test.py:273 and trace the generated message back to its template or source. Improve the validation wording, then regenerate or run the relevant Python petstore sample to confirm the output is intelligible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100