lib/swagalicious/response_validator.rb in swagalicious-1.1.2 vs lib/swagalicious/response_validator.rb in swagalicious-2.0.0
- old
+ new
@@ -50,10 +50,10 @@
def definitions_or_component_schemas(swagger_doc, version)
if version.start_with?("2")
swagger_doc.slice(:definitions)
else # Openapi3
if swagger_doc.key?(:definitions)
- puts "Swagger::Specs: WARNING: definitions is replaced in OpenAPI3! Rename to components/schemas (in swagger_helper.rb)"
+ @config.logger.warn "Swagger::Specs: WARNING: definitions is replaced in OpenAPI3! Rename to components/schemas (in swagger_helper.rb)"
swagger_doc.slice(:definitions)
else
components = swagger_doc[:components] || {}
{ components: { schemas: components[:schemas] } }
end