grpc-ecosystem/grpc-gateway

Swagger Conformance

Aperta

#815 aperta il 17 nov 2018

 (3 commenti) (1 reazione) (0 assegnatari)Go (2250 fork)batch import
help wantedopenapiquestionwaiting on reporter

Metriche repository

Star
 (16.971 stelle)
Metriche merge PR
 (Merge medio 8g 23h) (147 PR mergiate in 30 g)

Descrizione

Go to https://editor.swagger.io/

Click File -> Import URL

Enter https://raw.githubusercontent.com/grpc-ecosystem/grpc-gateway/master/examples/proto/examplepb/a_bit_of_everything.swagger.json (current ABE example)

Find some validation errors:

Schema error at paths['/v1/example/a_bit_of_everything/echo/{value}'].get.responses['404']
should NOT have additional properties
additionalProperty: description, schema
Jump to line 63
Schema error at paths['/v1/example/a_bit_of_everything/echo/{value}'].get.responses['404'].schema
should match exactly one schema in oneOf
Jump to line 65
Schema error at paths['/v1/example/a_bit_of_everything/echo/{value}'].get.responses['404'].schema.type
should be equal to one of the allowed values
allowedValues: array, boolean, integer, null, number, object, string, file
Jump to line 66
Semantic error at paths./v1/example/a_bit_of_everything/{uuid}
Equivalent paths are not allowed.
Jump to line 422
Schema error at paths['/v2/example/echo'].get.responses['404']
should NOT have additional properties
additionalProperty: description, schema
Jump to line 689
Schema error at paths['/v2/example/echo'].get.responses['404'].schema
should match exactly one schema in oneOf
Jump to line 691
Schema error at paths['/v2/example/echo'].get.responses['404'].schema.type
should be equal to one of the allowed values
allowedValues: array, boolean, integer, null, number, object, string, file
Jump to line 692
Schema error at paths['/v2/example/echo'].post.responses['404']
should NOT have additional properties
additionalProperty: description, schema
Jump to line 724
Schema error at paths['/v2/example/echo'].post.responses['404'].schema
should match exactly one schema in oneOf
Jump to line 726
Schema error at paths['/v2/example/echo'].post.responses['404'].schema.type
should be equal to one of the allowed values
allowedValues: array, boolean, integer, null, number, object, string, file
Jump to line 727

I wonder, what does their "should" actually mean? If it's a RFC-style "SHOULD", it's not critical.. but it reads like a "real" error though.

Guida contributor