cloudendpoints / endpoints-java

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

Improve Swagger schema compatibility with Cloud Endpoints Portal #161

Closed clementdenis closed 6 years ago

clementdenis commented 6 years ago

This change adds the missing "type": "object" field in resource schema, to prevent resources to be displayed as "any" schema definition in Cloud Endpoints Portal.

Also, it removes enums from resources, as they can't be used neither as body or response, and Endpoints Portal does not display the possible values anyway. Instead, it inlines the enum definitions each time they are used.

codecov-io commented 6 years ago

Codecov Report

Merging #161 into master will decrease coverage by 0.01%. The diff coverage is 83.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #161      +/-   ##
============================================
- Coverage     80.08%   80.07%   -0.02%     
+ Complexity     1689     1688       -1     
============================================
  Files           157      157              
  Lines          5625     5625              
  Branches        732      733       +1     
============================================
- Hits           4505     4504       -1     
  Misses          840      840              
- Partials        280      281       +1
Impacted Files Coverage Δ Complexity Δ
...oogle/api/server/spi/swagger/SwaggerGenerator.java 77.23% <83.33%> (-0.41%) 56 <2> (-1)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2f34aad...0d427c0. Read the comment docs.