test: mark password fields as having the password OpenApi format
MA
7h ago+672+672+012345678901234567890123456789-4396-4396-0123456789012345678901234567890123456789
I saw that the AI-review comments on issues that are outside of scope but still relevant in general, so I thought they could be fixed so that they will not occur in the future.
(Image taken from https://github.com/OpenAPITools/openapi-generator/pull/22726)
What I have done is that I have marked the password fields with format: password, so that the generated code will properly use the generator functionality to censor the field when any explicit logging is invoked (e.g., .toString() in Java).
PR checklist
- Read the contribution guidelines.
- Run the following to build the project and update samples:
(For Windows users, please run the script in WSL)./mvnw clean package || exit ./bin/generate-samples.sh ./bin/configs/*.yaml || exit ./bin/utils/export_docs_generators.sh || exit
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example./bin/generate-samples.sh bin/configs/java*.
IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed. - If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.
Summary by cubic
Adds format: password to password fields in test OpenAPI specs so generated code can mask password values in explicit logging such as Java's toString().
- Updates ~100 petstore test resources across Swagger 1.2, 2.0, and 3.0 specs.
- Removes
wordnik.jsonandwordnik.yamltest resources, which appears unrelated to the format change.