Skip to content

Conversation

@jmini
Copy link

@jmini jmini commented Feb 12, 2018

I have tried to run `` against the examples I found in Swagger folder.

cd openapi-diff/src/modeler/AutoRest.Swagger.Tests/Resource/Swagger
oad compare old/added_path.json new/added_path.json
oad compare old/added_property_in_response.json new/added_property_in_response.json
oad compare old/added_required_property.json new/added_required_property.json
oad compare old/changed_operation_id.json new/changed_operation_id.json
oad compare old/enum_values_changed.json new/enum_values_changed.json
oad compare old/misc_checks_01.json new/misc_checks_01.json
oad compare old/misc_checks_02.json new/misc_checks_02.json
oad compare old/operation_check_01.json new/operation_check_01.json
oad compare old/operation_check_02.json new/operation_check_02.json
oad compare old/operation_check_03.json new/operation_check_03.json
oad compare old/operation_check_04.json new/operation_check_04.json
oad compare old/operation_check_05.json new/operation_check_05.json
oad compare old/param_check_01.json new/param_check_01.json
oad compare old/readonly_changes.json new/readonly_changes.json
oad compare old/recursive_model.json new/recursive_model.json
oad compare old/removed_definition.json new/removed_definition.json
oad compare old/removed_operation.json new/removed_operation.json
oad compare old/removed_path.json new/removed_path.json
oad compare old/removed_property.json new/removed_property.json
oad compare old/required_parameter.json new/required_parameter.json
oad compare old/response_check_01.json new/response_check_01.json
oad compare old/type_changed.json new/type_changed.json
oad compare old/version_check_01.json new/version_check_01.json
oad compare old/version_check_02.json new/version_check_02.json
oad compare old/version_check_03.json new/version_check_03.json
oad compare old/version_check_04.json new/version_check_04.json

I got a lot of errors, preventing me to get the results.
Example:

$ oad compare old/added_path.json new/added_path.json
FATAL: swagger-document/loader - FAILED
FATAL: Error: File 'file:///___/openapi-diff/src/modeler/AutoRest.Swagger.Tests/Resource/Swagger/new/added_path.json' is not a valid OpenAPI 2.0 definition (expected 'swagger: 2.0')
  Error: File 'file:///___/openapi-diff/src/modeler/AutoRest.Swagger.Tests/Resource/Swagger/new/added_path.json' is not a valid OpenAPI 2.0 definition (expected 'swagger: 2.0')

With this Pull Request, I have updated all Swagger definitions in order to be able to run the tool.

  • definition declaration: "swagger": 2.0 => "swagger": "2.0"
  • tag => tags
  • set paths everywhere
  • set responses everywhere
  • add description in responses when missing
  • remove "type": "object" when a schema is defined
  • remove collectionFormat

* definition declaration: "swagger": 2.0 => "swagger": "2.0"
* tag => tags
* set paths everywhere
* set responses everywhere
* add description in responses when missing
* remove object type when a schema is defined
* remove collectionFormat
@msftclas
Copy link

msftclas commented Feb 12, 2018

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

❌ jmini sign now
You have signed the CLA already but the status is still pending? Let us recheck it.

@michaeljqzq michaeljqzq closed this Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants