cloudendpoints / endpoints-java

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

fix schema generation for transformer corner case #89

Closed tangiel closed 7 years ago

tangiel commented 7 years ago

When a Transformer affects an array element type, SchemaRepository treated it as the non-transformed type. If the Transformer transformed to a primitive, SchemaRepository tried to add the primitive as an object schema, resulting in an error. This fixes that by getting the schema type when dealing with array types.

codecov-io commented 7 years ago

Codecov Report

Merging #89 into master will increase coverage by 0.05%. The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #89      +/-   ##
============================================
+ Coverage     79.46%   79.51%   +0.05%     
- Complexity     1620     1621       +1     
============================================
  Files           154      154              
  Lines          5458     5458              
  Branches        702      702              
============================================
+ Hits           4337     4340       +3     
+ Misses          846      844       -2     
+ Partials        275      274       -1
Impacted Files Coverage Δ Complexity Δ
.../api/server/spi/config/model/SchemaRepository.java 91.83% <100%> (ø) 26 <0> (ø) :arrow_down:
.../java/com/google/api/server/spi/SystemService.java 85% <0%> (+1.5%) 38% <0%> (+1%) :arrow_up:

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 c40af2f...ee43411. Read the comment docs.