Skip to content

Commit

Permalink
qs
Browse files Browse the repository at this point in the history
  • Loading branch information
mgoworko committed Sep 10, 2024
1 parent 3a8aca4 commit 874206e
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 112 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class NuDesignerApiAvailableToExposeYamlSpec extends AnyFunSuite with Matchers {
val examplesValidationResult = OpenAPIExamplesValidator.forTapir.validateExamples(
specYaml = generatedSpec,
excludeResponseValidationForOperationIds = List(
"getApiProcessesScenarionameActivityActivities" // todo NU-1772: responses contains discriminator, it is not properly handled by validator
"getApiProcessesScenarionameActivityActivities" // todo NU-1772: responses contain discriminator, it is not properly handled by validator
)
)
val clue = examplesValidationResult
Expand All @@ -50,9 +50,15 @@ class NuDesignerApiAvailableToExposeYamlSpec extends AnyFunSuite with Matchers {
}

test("Nu Designer OpenAPI document with all available to expose endpoints has to be up to date") {
val currentNuDesignerOpenApiYamlContent =
(Project.root / "docs-internal" / "api" / "nu-designer-openapi.yaml").contentAsString
NuDesignerApiAvailableToExpose.generateOpenApiYaml should be(currentNuDesignerOpenApiYamlContent)
// todo NU-1772: OpenAPI differs when generated on Scala 2.12 and Scala 2.13 (order of endpoints is different)
// test is for now ignored on Scala 2.12
if (scala.util.Properties.versionNumberString.startsWith("2.13")) {
val currentNuDesignerOpenApiYamlContent =
(Project.root / "docs-internal" / "api" / "nu-designer-openapi.yaml").contentAsString
NuDesignerApiAvailableToExpose.generateOpenApiYaml should be(currentNuDesignerOpenApiYamlContent)
} else {
info("OpenAPI differs when generated on Scala 2.12 and Scala 2.13. Test is ignored on Scala 2.12")
}
}

test("API enum compatibility test") {
Expand Down
Loading

0 comments on commit 874206e

Please sign in to comment.