swagger-api / swagger-api/swagger-codegen

Add endpoint examples defined in the spec to API servers

Open
#5,423 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature Feature List: API servers help wanted Server: C-Sharp Server: Erlang Server: Go Server: Haskell Server: Java Server: Nodejs Server: PHP Server: Python Server: Ruby Server: Scala Server: Spring
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

Similar to what we've done for SpringMVC generator, we want to add support of endpoint examples defined in the spec to the auto-generated server stubs.

Ref: https://github.com/swagger-api/swagger-codegen/pull/5411

Endpoint example support in the server generators:

  • C# (NancyFx, ASP.net Core)
  • Elixir
  • Erlang
  • Go
  • Haskell Servant
  • JavaScript/NodeJS
  • Java (MSF4J, Spring✅, Undertow, JAX-RS: CDI, CXF, Inflector, RestEasy)
  • PHP (Lumen, Slim, Silex, Zend Expressive)
  • Python Flask
  • Ruby (Sinatra, Rails)
  • Scala Finch
  • Scala Scalatra
Suggest a Fix

#5411 is a good reference. If anyone wants to contribute to this task, please reply to let us know. Thank you.

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

Start with PR #5411, then compare its endpoint-example handling with the unchecked server generators listed in this issue. Map the remaining generators and their templates or entry points, and consider the work done when endpoint examples from the spec are supported across the requested server generators.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.