swagger-api / swagger-api/swagger-codegen
Clojure: Unexpected namespace names for /api/v1 resource
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to build a client for the Kubernetes API, which is available at a /api/v1 resource:
{
"swaggerVersion": "1.2",
"apiVersion": "v1",
"basePath": "https://...",
"resourcePath": "/api/v1",
...
}
swagger-codegen generates following file:
; src/kubernetes/api/apiv.clj
(ns kubernetes.api.apiv
...
The filename (src/kubernetes/api/apiv.clj) and namespace name kubernetes.api.apiv are unexpected. I would rather expect swagger-codegen to generate src/kubernetes/api/v1.clj which contains the kubernetes.api.v1 namespace.
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
Reproduce the report with a Kubernetes Swagger 1.2 definition containing the /api/v1 resource, then trace the Clojure generation path that produces src/kubernetes/api/apiv.clj and kubernetes.api.apiv. Done means the generated file and namespace use v1 as requested, with a regression check for this resource name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100