swagger-api / swagger-api/swagger-codegen
put compute expression not regular expression put into swagger parameter
Open
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
want put expression into the parameter for example
- name: "sign"
in: "header"
description: Nonce
required: true
type: "string"
default: "1000000" - name: "nonce"
in: "header"
description: nonce
required: true
type: "string"
default: "efg" - name: "appSecret"
in: "header"
description: secret
required: true
type: "string"
default: "abc"
the sign value should be
StringBuilder toSign = new StringBuilder(appSecret).append(nonce); String sign = CodeUtil.hexSHA1(toSign.toString());
Swagger-codegen version
swagger2.0
Swagger declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
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
No source file, generator target, declaration, command, or test is provided. Start by identifying how Swagger 2.0 parameters are represented and generated, then determine the intended expression syntax and scope; the issue does not define complete criteria beyond supporting a computed sign value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100