swagger-api / swagger-api/swagger-core

If a property has no annotation, but only a getter, it should be read-only.

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

If a property has no annotation, but only a getter, it should be read-only.

For example.

public class Cap {

    public String getBrand() {
        return "no brand";
    }
}

A Cap's property "brand" should be read-only. Because there's no way to write "brand".

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 file, test, or entry point is named. Start by locating the Java property/schema generation logic for getter-only properties, then verify that a property with only a getter is emitted as read-only and that writable properties remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
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.