swagger-api / swagger-api/swagger-core

Forced lower-casing of some property names in generated OpenAPI spec

Open
#4,600 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

I came across an issue where Swagger is unnecessarily lower-casing some property names, which results in hard to trace bugs. E.g. it forcefully lower-cases 'pTScore' property name (i.e. 'ptscore' instead of 'pTScore'), causing nulls for that field in de-serialized instances passed around, and problems in calculations in turn. etc.

Because of this bug, we cannot have OpenAPI spec generation fully automated – such wrongly lower-cased property names have to be corrected in the generated OpenAPI spec, as an additional manual step (or via a temporary bash script which replaces them).

Screenshot from 2024-01-22 18-40-51

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

No source files or tests are identified in the issue. Start by reproducing OpenAPI generation with a property named pTScore, then trace where the generated name becomes ptscore. Done means the generated specification preserves the original property name and serialized instances no longer lose that field during deserialization.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.