apiaryio / fury-adapter-swagger

Swagger 2.0 parser adapter for Fury.js
MIT License
11 stars 12 forks source link

What is the difference between (3) and (6) in warning messages? #179

Closed erajkovic closed 5 years ago

erajkovic commented 6 years ago

From README.md (https://github.com/apiaryio/fury-adapter-swagger) looks like (3) is for data lost in conversion, but (6) is not listed.

Here is a partial output I got from one file: warning: (6) Expected type number but found type string warning: (6) Expected type number but found type string warning: (3) Default response is not yet supported warning: (3) Unable to generate application/json example message body out of JSON Schema warning: (3) Circular references in schema are not yet supported

Looks like the code (6) are 'non-fatal' error in the content, which should be addressed by the owner of the spec.

Here are some other messages I got in other files: warning: (6) Invalid content type 'json', invalid media type warning: (6) Invalid content type 'Method was not annotated with @Produces', invalid media type

For completeness, here are the other type-3 messages I got in the sampler of Swagger documents I am trying to validates: warning: (3) Arrays in form parameters are not fully supported yet warning: (3) Unable to generate application/vnd.com.oracle.oraclecloud.metering.cloudbucklimits+json example message body out of JSON Schema warning: (3) Unable to generate application/vnd.oracle.adf.resourceitem+json example message body out of JSON Schema warning: (3) Unable to generate multipart/form-data; boundary=BOUNDARY example message body out of JSON Schema warning: (3) Unable to generate application/json; charset=utf-8 example message body out of JSON Schema

kylef commented 6 years ago

The warning types/codes are defined in https://github.com/apiaryio/fury-adapter-swagger/blob/master/src/annotations.js. Linking in the issue at https://github.com/apiaryio/api-elements/issues/24 regarding codes.