diff --git a/openapi-model/src/main/scala/sttp/apispec/openapi/validation/OpenAPIComparator.scala b/openapi-model/src/main/scala/sttp/apispec/openapi/validation/OpenAPIComparator.scala index ee98a39..c399a34 100644 --- a/openapi-model/src/main/scala/sttp/apispec/openapi/validation/OpenAPIComparator.scala +++ b/openapi-model/src/main/scala/sttp/apispec/openapi/validation/OpenAPIComparator.scala @@ -64,8 +64,8 @@ class OpenAPIComparator( private def checkOperation( httpMethod: String, - readerOperation: Operation, - writerOperation: Operation + writerOperation: Operation, + readerOperation: Operation ): Option[IncompatibleOperation] = { val readerParameters = getOperationParameters(readerOperation) val writerParameters = getOperationParameters(writerOperation) @@ -104,7 +104,7 @@ class OpenAPIComparator( Some(IncompatibleOperation(httpMethod, issues)) } - private def checkParameter(readerParameter: Parameter, writerParameter: Parameter): Option[IncompatibleParameter] = { + private def checkParameter(writerParameter: Parameter, readerParameter: Parameter): Option[IncompatibleParameter] = { val isCompatibleStyle = readerParameter.style == writerParameter.style val isCompatibleExplode = readerParameter.explode == writerParameter.explode val isCompatibleAllowEmptyValue = readerParameter.allowEmptyValue == writerParameter.allowEmptyValue @@ -125,8 +125,8 @@ class OpenAPIComparator( } private def checkContent( - readerContent: ListMap[String, MediaType], - writerContent: ListMap[String, MediaType] + writerContent: ListMap[String, MediaType], + readerContent: ListMap[String, MediaType] ): Option[IncompatibleContent] = { val issues = writerContent.flatMap { case (writerMediaType, writerMediaTypeDescription) => val readerMediaTypeDescription = readerContent.get(writerMediaType) @@ -157,8 +157,8 @@ class OpenAPIComparator( } private def checkSchema( - readerSchema: Option[SchemaLike], - writerSchema: Option[SchemaLike] + writerSchema: Option[SchemaLike], + readerSchema: Option[SchemaLike] ): Option[OpenAPICompatibilityIssue] = { (readerSchema, writerSchema) match { case (Some(readerSchema: Schema), Some(writerSchema: Schema)) =>