swagger-api / swagger-api/swagger-codegen

put compute expression not regular expression put into swagger parameter

Open
#6,781 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.