swagger-api / swagger-api/swagger-codegen

Codegen API Ordering for HTML Clients

Open
#10,400 0 comments 1 reaction 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

For HTML clients the APIs grouped by tags, are ordered alphabetically by tag. I have defined global tags in my preferred order. The Swagger UI seems to display as per my defined order, but Codegen for HTML Client does not. It would be good to have support for API ordering as per global tag definitions OR to follow the order of API in the declarations file.

Swagger-codegen version

3.0.20

Swagger declaration file content or url
openapi: 3.0.1
info:
  title: Test Service
  description: Test Service 
  termsOfService: ''
  version: 0.0.1
tags:
  - name: V
    description: All APIs belonging to V
  - name: S
    description: All APIs belonging to S
  
paths:
  /vendors:
    get:
      summary: Returns a list of all the Vendors.
      operationId: getListOfVendors
      tags:
        - V
      responses:
        '200':
          description: Success

  /samples:
    get:
      summary: Returns a list of all Samples.
      description: ''
      operationId: getSamples
      tags:
        - S
      responses:
        '200':
          description: Success
Command line used for generation

Generate HTML Client code using Codegen. I have tried generating using the Swagger Editor.

Steps to reproduce

Generate HTML Client code using Codegen. I have tried generating using the Swagger Editor.

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

Use the supplied OpenAPI YAML as a reproduction case and run HTML Client generation through Codegen or Swagger Editor. Trace the HTML client grouping and ordering entry point, then determine whether global tag order or declaration order is authoritative. Done means generated API groups follow the chosen order and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, openapi
Domain
api, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.