swagger-api / swagger-api/swagger-core

Lack of configuration option in ‘Swagger Gradle Plugin’, which allows to include additional models

Open
#4,598 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

backlog
Dominant language
Java
Stars
7.5k
Forks
2.3k
Avg merge
18h 1m
Merged PRs (30d)
10

Description

Currently, to the best of my knowledge, there is no configuration option in ‘Swagger Gradle Plugin’ (https://github.com/swagger-api/swagger-core/blob/master/modules/swagger-gradle-plugin/README.md), which allows to specify additional (unreachable) models to include. E.g. in models based on the ‘GeoJSON’ standard (https://geojson.org/), Swagger has no access to Geometry sub-types such as Point, LineString, Polygon, etc.

I do realize Swagger Annotations can be used in such cases to specify those sub-types and add discriminator and discriminator-mapping, but our model code is generated off EMF Ecore, therefore we cannot include any custom annotations as these would get overwritten on each build; see https://github.com/eclipse-emf/org.eclipse.emf/issues/27 for more details.

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 Swagger Gradle Plugin README linked in the issue, then inspect the modules/swagger-gradle-plugin source and its existing configuration handling. Determine how users could specify unreachable GeoJSON model sub-types without annotations; done means the option is documented and causes those additional models to appear in generated OpenAPI output, with coverage added where the plugin’s tests support it.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.