swagger-api / swagger-api/swagger-codegen

[Gradle] plugin and sample task that generates code as part of the build process

Open
#4,758 60 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Compatibility General: Suggestion
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

When I look at the long readme of the project at https://github.com/swagger-api/swagger-codegen, Gradle is not even mentioned on it. You encourage people to wget the .jar file instead, and then go to the command line to generate code with it from swagger.json (optionally via a shell script that of course needs to be tweaked as it's specific to the 'petstore' sample).
Way down towards the end of the page there is a reference to a maven plugin as well but no gradle plugin. So Android developers that are pretty much forced by Google to use Gradle tools are now left with going to the command line every time the json spec changes or to learn bash again and tweak your script (which by the way also requires you to go to the command line every time).

Suggest a Fix

We have a working Gradle plugin and Android project using it that generates Api and Dto classes for every new version of the Json spec. Might publish it via a PR.

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 the project's long README, especially its command-line generation instructions and Maven plugin reference, then review the Gradle plugin and Android project described in the issue. Done means the repository documents and demonstrates a Gradle build task that generates API and DTO classes from the JSON specification.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
build-system, mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.