Skip to content

Commit

Permalink
Ensure consistent parameter order across all methods
Browse files Browse the repository at this point in the history
  • Loading branch information
abdelfetah18 committed Nov 29, 2024
1 parent ba352ba commit d811249
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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)) =>
Expand Down

0 comments on commit d811249

Please sign in to comment.