swagger-api / swagger-api/swagger-codegen

Client Spring Cloud Swagger Codegen

Open
#8,979 0 comments 0 reactions 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

Can't consume spring-cloud client

Swagger-codegen version

swagger-codegen-cli-2.3.1.jar

Swagger declaration file content or url
{"swagger":"2.0","info":{"description":"Microservice to acess db","version":"1.0","title":"AdidasDB","license":{"name":"Iorran License"}},"host":"localhost:8080","basePath":"/adidas-db","tags":[{"name":"subscription-controller","description":"Subscription Controller"}],"paths":{"/subscriptions":{"get":{"tags":["subscription-controller"],"summary":"Recovery all subscriptions","operationId":"findAllSubscription","produces":["*/*"],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/Subscription"}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"basicAuth":[]}],"deprecated":false},"post":{"tags":["subscription-controller"],"summary":"Create a new subscription","operationId":"createSubscription","consumes":["application/json"],"produces":["*/*"],"parameters":[{"in":"body","name":"subscription","description":"subscription","required":true,"schema":{"$ref":"#/definitions/Subscription"}}],"responses":{"200":{"description":"OK","schema":{"type":"integer","format":"int64"}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"basicAuth":[]}],"deprecated":false}},"/subscriptions/{id}":{"get":{"tags":["subscription-controller"],"summary":"Recovery subscription by id","operationId":"findSubscriptionById","produces":["*/*"],"parameters":[{"name":"id","in":"path","description":"Subscription Id","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Subscription"}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"basicAuth":[]}],"deprecated":false}}},"securityDefinitions":{"basicAuth":{"type":"basic"}},"definitions":{"Subscription":{"type":"object","required":["consent","dateOfBith","email","newsletterId"],"properties":{"consent":{"type":"boolean","description":"flag for consent"},"dateOfBith":{"type":"string","format":"date","description":"user date of bith"},"email":{"type":"string","description":"user email"},"firstName":{"type":"string","description":"user name"},"gender":{"type":"string","description":"gender","enum":["M","F"]},"id":{"type":"integer","format":"int64","description":"subscription id generated value"},"newsletterId":{"type":"integer","format":"int64","description":"newsletter Id corresponding to the campaign"}},"title":"Subscription"}}}
Command line used for generation

java -jar swagger-codegen-cli-2.3.1.jar generate -i api-docs.json --api-package com.adidas.db.client.api --model-package com.adidas.db.client.model --invoker-package com.adidas.db.client.invoker --group-id com.adidas.db --artifact-id adidas-db-api --artifact-version 1.0.0 -l java --library spring-cloud -o api-example

I've related it on stackoverflow too!

https://pt.stackoverflow.com/questions/348925/client-spring-cloud-swagger-codegen

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 reported command with the supplied api-docs.json and the --library spring-cloud option, then inspect the generated api-example client and compare its behavior with the Spring Cloud service. The issue does not include an error or expected result, so first document the failure; done requires a reproducible diagnosis and a verified fix or clarified limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.