swagger-api / swagger-api/swagger-codegen

Clojure: Unexpected namespace names for /api/v1 resource

Open
#2,381 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: Clojure help wanted Issue: Bug
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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.