cloudendpoints / endpoints-java

A Java framework for building RESTful APIs on Google App Engine
Apache License 2.0
32 stars 35 forks source link

Generate proper API description for Map types using "additionalProperties" #142

Open clementdenis opened 6 years ago

clementdenis commented 6 years ago

Both Discovery and Swagger formats support generic Map types, through the "additionalProperties" field in JsonSchema. This is also supported by the Java API client generator used by Cloud Endpoints.

However, all Map input and output types are currently handled by Cloud Endpoints as "JsonMap", which prevent proper autocomplete in API explorer / Swagger UI, and generate API clients with no typing at for Maps.

This branch in our fork implements Map support through additionalProperties.

Before creating a PR, I'd like to validate a few things: