Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to add a dot in query parameters #1368

Closed
Thodin3 opened this issue Apr 13, 2021 · 2 comments · Fixed by #1370
Closed

Allow to add a dot in query parameters #1368

Thodin3 opened this issue Apr 13, 2021 · 2 comments · Fixed by #1370
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Thodin3
Copy link
Contributor

Thodin3 commented Apr 13, 2021

Dot not allowed in query parameters

Like it's possible to add a dot in HTTP GET parameters, it's allowed in OASv3.
But currently not possible in Spot like:

        {
          name: "postal.code",
          in: "query",
          required: false
        }

Allow it in Query parameters
The extractQueryParamName regex should be extended to .

Additional context
In TS contracts, it will be quoted parameter names :

class EndpointWithQueryParams {
  @request
  request(
    @queryParams
    queryParams: {
      country: String;
      "postal.code"?: String;
    }
  ) {}
@lfportal lfportal added enhancement New feature or request good first issue Good for newcomers labels Apr 13, 2021
@Thodin3
Copy link
Contributor Author

Thodin3 commented Apr 13, 2021

@lfportal I can do the pull request for this one.

Thodin3 added a commit to Thodin3/spot that referenced this issue Apr 13, 2021
Thodin3 added a commit to Thodin3/spot that referenced this issue Apr 13, 2021
@lfportal lfportal added wip Currently being worked on and removed wip Currently being worked on labels Apr 14, 2021
@lfportal lfportal linked a pull request Apr 14, 2021 that will close this issue
2 tasks
@lfportal
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants