swagger-api / swagger-core

Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API
http://swagger.io
Apache License 2.0
7.36k stars 2.17k forks source link

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

Open beyond-seunghyun opened 2 months ago

beyond-seunghyun commented 2 months ago

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".