thim81 / thim81/openapi-format

sort - order request parameters by name

Open
#82 5 comments 0 reactions 1 assignee View on GitHub

@thim81 is already working on this.

Since Jul 9, 2023.

awaiting feedback enhancement
Dominant language
JavaScript
Stars
177
Forks
29
Avg merge
3d 13h
Merged PRs (30d)
1

Description

I couldn't figure out how to do this.
I need the get, post etc. request parameters to be ordered by the value of the name field.
The parameter fields themselves are ordered consistently according to the config but I'd like the the parameter ordering itself to be alphabetical.

    "/api/products": {
      "get": {
        "summary": "Get the list of existing products.",
        "parameters": [
          {
            "name": "offset",    _this should be the second one_
            "in": "query",
            "description": "The offset to apply to the paginated query.",
            "required": false,
            "default": 0,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          {
            "name": "limit",        _l comes before o, this should be the first one_
            "in": "query",
            "description": "The limit to apply to the paginated query.",
            "required": false,
            "default": null,
            "format": "int32",
            "maximum": 100,
            "minimum": 0,
            "type": "integer",
            "x-nullable": true
          }
        ],

Contributor guide

No contributing guide indexed for this repository

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.