swagger-api / swagger-api/swagger-codegen
swagger-codegen -l html2 should include the basePath in the method headline/definition?
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
swagger-codegen -l html2 should include the basePath in the method headline/definition?
Swagger-codegen version
current master; HEAD = 1c160df33897898da1c39f230c737eb6a313e6ba
Swagger declaration file content or url
swagger: '2.0'
info:
title: "sscce"
version: '1.0'
description: sscce
basePath: /v1
paths:
/foo:
post:
parameters:
- name: foo
in: params
type: int
responses:
"200":
description: foo
type: string
Command line used for generation
JAR=".../swagger-codegen.git/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"
java -jar "${JAR}" generate -i ~/sscce.yaml -l html2 -o foo
renders as

Notice the incosistency between the first first black-background-rectangle and the curl command.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the provided swagger-codegen CLI command with the YAML declaration and inspect the html2 output, especially the method headline, definition, and curl command. Trace the html2 templates or generator entry point responsible for those sections. Done means the displayed method path consistently includes the /v1 basePath.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100