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.37k stars 2.17k forks source link

Include fluent methods in Schema to add types and examples #4651

Open alex-albericio opened 5 months ago

alex-albericio commented 5 months ago

In order to allow chaining with the rest of fluent methods in Schema (of swagger-models), there should be methods to add a type or an example that return the updated Schema, similar to existing ones such as addRequiredItem or addProperty.