Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalise path templates when generating ZIO Http RoutePattern-s #4051

Merged
merged 1 commit into from
Sep 18, 2024

Generalise path templates when generating ZIO Http RoutePattern-s

4ed4d86
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

Generalise path templates when generating ZIO Http RoutePattern-s #4051

Generalise path templates when generating ZIO Http RoutePattern-s
4ed4d86
Select commit
Loading
Failed to load commit list.
GitHub Actions / Test report for 2.12-Native-11 succeeded Sep 18, 2024 in 1s

337 passed, 0 failed and 0 skipped

Tests passed successfully

Report Passed Failed Skipped Time
core/target/native-2.12/test-reports/TEST-sttp.tapir.annotations.DeriveEndpointIOTest.xml 30✅ 1ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.AttributeTest.xml 3✅ 2ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.CodecTest.xml 6✅ 102ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.EndpointTest.xml 76✅ 7ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.generic.EnumsCodecDerivationTest.xml 4✅ 1ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.generic.FormCodecDerivationTest.xml 14✅ 4ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.generic.LegacySchemaGenericAutoTest.xml 8✅ 5ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.generic.MultipartCodecDerivationTest.xml 13✅ 2ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.generic.SchemaGenericAutoTest.xml 29✅ 0ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.generic.ValueClassCodecDerivationTest.xml 1✅ 0ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.internal.RichEndpointInputTest.xml 5✅ 0ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.internal.RichEndpointOutputTest.xml 1✅ 0ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.internal.UrlencodedDataTest.xml 4✅ 1ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.LegacySchemaApplyValidationTest.xml 1✅ 1ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.namespacing.SchemaMacroNamespaceTest.xml 2✅ 0ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.SchemaAnnotationsTest.xml 1✅ 0ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.SchemaApplyValidationTest.xml 13✅ 436ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.SchemaMacroTest.xml 26✅ 2ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.SchemaMacroTest2.xml 5✅ 27ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.SchemaTest.xml 13✅ 2ms
core/target/native-2.12/test-reports/TEST-sttp.tapir.typelevel.MatchTypeTest.xml 8✅ 1s
core/target/native-2.12/test-reports/TEST-sttp.tapir.ValidatorTest.xml 28✅ 2ms
integrations/zio-prelude/target/native-2.12/test-reports/TEST-sttp.tapir.codec.zio.prelude.newtype.TapirNewtypeSupportTest.xml 8✅ 1ms
integrations/zio-prelude/target/native-2.12/test-reports/TEST-sttp.tapir.codec.zio.prelude.newtype.TapirNewtypeTest.xml 8✅ 0ms
integrations/zio/target/native-2.12/test-reports/TEST-sttp.tapir.ztapir.ZioServerSentEventsTest.xml 0ms
integrations/zio/target/native-2.12/test-reports/TEST-sttp.tapir.ztapir.ZTapirTest.xml 0ms
json/zio/target/native-2.12/test-reports/TEST-sttp.tapir.json.zio.TapirJsonZioTest.xml 8✅ 49ms
server/core/target/native-2.12/test-reports/TEST-sttp.tapir.server.interceptor.cors.CORSConfigTest.xml 2✅ 0ms
server/core/target/native-2.12/test-reports/TEST-sttp.tapir.server.interceptor.cors.CORSInterceptorTest.xml 2✅ 3ms
server/core/target/native-2.12/test-reports/TEST-sttp.tapir.server.interceptor.decodefailure.DefaultDecodeFailureHandlerTest.xml 5✅ 1ms
server/core/target/native-2.12/test-reports/TEST-sttp.tapir.server.interpreter.DecodeBasicInputsTest.xml 1✅ 26ms
server/core/target/native-2.12/test-reports/TEST-sttp.tapir.server.interpreter.FilterServerEndpointsTest.xml 9✅ 0ms
server/core/target/native-2.12/test-reports/TEST-sttp.tapir.server.interpreter.ServerInterpreterTest.xml 3✅ 1ms

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.annotations.DeriveEndpointIOTest.xml

30 tests were completed in 1ms with 30 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.annotations.DeriveEndpointIOTest 30✅ 1ms

✅ sttp.tapir.annotations.DeriveEndpointIOTest

✅ @endpointInput should derive correct input for @query, @cookie, @header
✅ @endpointInput should derive correct input for dealiased bodies
✅ @endpointInput should derive correct input for @queries, @headers, @cookies
✅ @endpointInput should derive correct input for auth annotations
✅ @endpointInput should derive correct input for auth annotations with named security schemes
✅ @endpointInput should derive input with descriptions
✅ @endpointInput should derive input with paths
✅ @endpointInput should derive correct input with schema annotations
✅ @endpointInput should derive default annotation correctly
✅ @endpointInput should customise inputs
✅ @endpointInput should derive correct input for byte array body
✅ @endpointInput should derive correct input for byte buffer body
✅ @endpointInput should derive correct input for input stream body
✅ @endpointInput should derive correct input for form body
✅ @endpointInput should derive correct input for file body
✅ @endpointInput should derive correct input for multipart body
✅ @endpointInput should accept empty case classes when annotated with @endpointInput
✅ @endpointInput should not compile if there is field without annotation
✅ @endpointInput should not compile if there are two body annotations
✅ @endpointInput should not compile for alone @apikey
✅ @endpointInput should not compile for body without JSON codec
✅ @endpointInput should not compile when not all paths are captured in case class
✅ @endpointInput should not compile when not all paths are captured in path
✅ @endpointInput should not compile when path contains duplicated variable
✅ @endpointOutput should devive correct output for @header, @setCookie, @statusCode
✅ @endpointOutput should derive correct output for @headers, @cookies, @setCookies
✅ @endpointOutput should not compile if there is field without annotation
✅ @endpointOutput should not compile if there are two body annotations
✅ @endpointOutput should not compile for wrong field type
✅ @endpointOutput should not report ambiguous header import errors

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.AttributeTest.xml

3 tests were completed in 2ms with 3 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.AttributeTest 3✅ 2ms

✅ sttp.tapir.AttributeTest

✅ should create an attribute key for a case class
✅ should create an attribute key for a list of case classes
✅ should create an attribute key for a list of generic case classes

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.CodecTest.xml

6 tests were completed in 102ms with 6 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.CodecTest 6✅ 102ms

✅ sttp.tapir.CodecTest

✅ should encode simple types using .toString
✅ should use default, when available
✅ should correctly encode and decode Date
✅ should create a part codec
✅ should call the validator during decoding when using .mapValidate
✅ should provide a mapEither function

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.EndpointTest.xml

76 tests were completed in 7ms with 76 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.EndpointTest 76✅ 7ms

✅ sttp.tapir.EndpointTest

✅ endpoint should compile inputs
✅ endpoint should compile security inputs
✅ endpoint should compile map security into case class
✅ endpoint should compile a path fold
✅ endpoint should compile inputs with streams
✅ endpoint should compile outputs
✅ endpoint should compile outputs with streams
✅ endpoint should compile error outputs
✅ endpoint should compile one-of empty output
✅ endpoint should allow to map status code multiple times to same format different charset
✅ endpoint should compile one-of empty output of a custom type
✅ endpoint should compile with a single error variant
✅ endpoint should compile with multiple error variants
✅ oneOfVariant should not compile when the type erasure of `T` is different from `T`
✅ tupling should combine two inputs
✅ tupling should combine four inputs in two groups
✅ tupling should combine four inputs in two groups, through an extend method (right)
✅ tupling should combine four inputs in two groups, through an extend method (left)
✅ show for Endpoint(securityin: -, in: /p1%2Fp2, errout: -, out: -) should be /p1%2Fp2 -> -/-
✅ show for Endpoint[E1](securityin: -, in: /p1, errout: -, out: -) should be [E1] /p1 -> -/-
✅ show for Endpoint(securityin: -, in: GET /p1 /p2, errout: -, out: -) should be GET /p1 /p2 -> -/-
✅ show for Endpoint(securityin: -, in: /p1 /[p2] /*, errout: -, out: -) should be /p1 /[p2] /* -> -/-
✅ show for Endpoint(securityin: -, in: POST ?q1 ?q2 {body as text/plain (UTF-8)}, errout: {body as text/plain (UTF-8)}, out: -) should be POST ?q1 ?q2 {body as text/plain (UTF-8)} -> {body as text/plain (UTF-8)}/-
✅ show for Endpoint(securityin: -, in: GET {header X-header}, errout: -, out: {header Y-header}) should be GET {header X-header} -> -/{header Y-header}
✅ show for Endpoint(securityin: -, in: GET, errout: -, out: one of({body as text/plain (UTF-8)}|{body as application/octet-stream})) should be GET -> -/one of({body as text/plain (UTF-8)}|{body as application/octet-stream})
✅ show for Endpoint(securityin: -, in: GET, errout: -, out: {body as text/plain (UTF-8)}) should be GET -> -/{body as text/plain (UTF-8)}
✅ show for Endpoint(securityin: -, in: GET, errout: -, out: {body as application/octet-stream}) should be GET -> -/{body as application/octet-stream}
✅ short show for Endpoint(securityin: -, in: -, errout: -, out: -) should be * *
✅ short show for Endpoint(securityin: -, in: /p1, errout: -, out: -) should be * /p1
✅ short show for Endpoint(securityin: -, in: /p1 /p2, errout: -, out: -) should be * /p1/p2
✅ short show for Endpoint(securityin: -, in: GET /p1 /p2, errout: -, out: -) should be GET /p1/p2
✅ short show for Endpoint(securityin: -, in: POST, errout: -, out: -) should be POST *
✅ short show for Endpoint(securityin: -, in: GET /p1 /*, errout: -, out: -) should be GET /p1/*
✅ short show for Endpoint[my endpoint](securityin: -, in: GET /p1 /p2, errout: -, out: -) should be [my endpoint]
✅ showPathTemplate for Endpoint(securityin: -, in: -, errout: -, out: -) should be *
✅ showPathTemplate for Endpoint(securityin: -, in: /, errout: -, out: -) should be /
✅ showPathTemplate for Endpoint(securityin: -, in: /p1, errout: -, out: -) should be /p1
✅ showPathTemplate for Endpoint(securityin: -, in: /p1 /p2, errout: -, out: -) should be /p1/p2
✅ showPathTemplate for Endpoint(securityin: /p1, in: /p2, errout: -, out: -) should be /p1/p2
✅ showPathTemplate for Endpoint(securityin: -, in: /p1 /[], errout: -, out: -) should be /p1/{param1}
✅ showPathTemplate for Endpoint(securityin: -, in: /p1 /[par], errout: -, out: -) should be /p1/{par}
✅ showPathTemplate for Endpoint(securityin: -, in: /p1 ?par, errout: -, out: -) should be /p1?par={par}
✅ showPathTemplate for Endpoint(securityin: -, in: /p1 ?par1 ?par2, errout: -, out: -) should be /p1?par1={par1}&par2={par2}
✅ showPathTemplate for Endpoint(securityin: -, in: /p1 /[par1] ?par2, errout: -, out: -) should be /p1/{par1}?par2={par2}
✅ showPathTemplate for Endpoint(securityin: -, in: /p1 auth(api key, via ?par2), errout: -, out: -) should be /p1?par2={par2}
✅ showPathTemplate for Endpoint(securityin: -, in: /p2 /[], errout: -, out: -) should be /p2/{param1}
✅ showPathTemplate for Endpoint(securityin: -, in: /p1%2Fp2, errout: -, out: -) should be /p1%2Fp2
✅ showPathTemplate for Endpoint(securityin: -, in: /EeXsx8*4n.9NjyT%3DYtJuUf%26F%21Aa5mM%29Ii-%40%2C%3BvG61VqQL%27bgBlPp0_2CH%2BcWh%287rKw%3AR%243k%7EODZozSd, errout: -, out: -) should be /EeXsx8*4n.9NjyT=YtJuUf&F!Aa5mM)Ii-@,;vG61VqQL'bgBlPp0_2CH+cWh(7rKw:R$3k~ODZozSd
✅ showPathTemplate for Endpoint(securityin: -, in: /p1 /*, errout: -, out: -) should be /p1/*
✅ showPathTemplate for Endpoint(securityin: -, in: /p1 ?*, errout: -, out: -) should be /p1?*
✅ showPathTemplate for Endpoint(securityin: -, in: /p1 /p2 ?par1 ?par2, errout: -, out: -) should be /p1?par1={par1}
✅ showPathTemplate for Endpoint(securityin: -, in: /not /allowed /chars /hi%3Fhello, errout: -, out: -) should be /not/allowed/chars/hi%3Fhello
✅ showPathTemplate should keep param count in show functions
✅ showPathTemplate should skip query parameters
✅ validate should accumulate validators
✅ validate should add validator for an option
✅ validate should add validator for an iterable
✅ validate should map input and output
✅ httpMethod for Endpoint(securityin: -, in: -, errout: -, out: -) should be None
✅ httpMethod for Endpoint(securityin: -, in: /api /cats /[] GET, errout: -, out: -) should be Some(GET)
✅ httpMethod for Endpoint(securityin: -, in: /api /cats /[] PUT, errout: -, out: -) should be Some(PUT)
✅ httpMethod for Endpoint(securityin: -, in: /api /cats /[] POST, errout: -, out: -) should be Some(POST)
✅ httpMethod for Endpoint(securityin: -, in: /api /cats /[] HEAD, errout: -, out: -) should be Some(HEAD)
✅ httpMethod for Endpoint(securityin: -, in: /api /cats /[] TRACE, errout: -, out: -) should be Some(TRACE)
✅ httpMethod for Endpoint(securityin: -, in: /api /cats /[] PATCH, errout: -, out: -) should be Some(PATCH)
✅ httpMethod for Endpoint(securityin: -, in: /api /cats /[] CONNECT, errout: -, out: -) should be Some(CONNECT)
✅ httpMethod for Endpoint(securityin: -, in: /api /cats /[] DELETE, errout: -, out: -) should be Some(DELETE)
✅ httpMethod for Endpoint(securityin: -, in: /api /cats /[] OPTIONS, errout: -, out: -) should be Some(OPTIONS)
✅ httpMethod for Endpoint(securityin: -, in: /api /cats /[] XX, errout: -, out: -) should be Some(XX)
✅ compile should work for endpoint descriptions providing partial server logic using serverLogicForCurrent
✅ mapTo should properly map between tuples and case classes of arity 1
✅ mapTo should properly map between tuples and case classes of arity 2
✅ mapTo should fail on invalid field type
✅ mapTo should fail on redundant field
✅ mapTo should fail on missing field
✅ mapTo should compile for case class with defined companion object

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.generic.EnumsCodecDerivationTest.xml

4 tests were completed in 1ms with 4 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.generic.EnumsCodecDerivationTest 4✅ 1ms

✅ sttp.tapir.generic.EnumsCodecDerivationTest

✅ should derive codec for an sealed-trait based enum
✅ should derive codec for an Scala enumeration
✅ should derive a customised codec for an Scala enumeration
✅ should derive a default codec for an Scala enumeration

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.generic.FormCodecDerivationTest.xml

14 tests were completed in 4ms with 14 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.generic.FormCodecDerivationTest 14✅ 4ms

✅ sttp.tapir.generic.FormCodecDerivationTest

✅ should generate a codec for a one-arg case class
✅ should generate a codec for a two-arg case class
✅ should generate a codec for a three-arg case class
✅ should generate a codec for a case class with optional parameters
✅ should use the right schema for a two-arg case class
✅ should generate a codec for a one-arg case class using snake-case naming transformation
✅ should generate a codec for a one-arg case class using screaming-snake-case naming transformation
✅ should generate a codec for a one-arg case class using kebab-case naming transformation
✅ should generate a codec for a one-arg case class with list
✅ should generate a codec for a one-arg case class with set
✅ should generate a codec for a one-arg case class with vector
✅ should generate a codec for a one-arg case class using implicit schema
✅ should generate a codec for a case class with simple types
✅ should generate a codec with custom field name

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.generic.LegacySchemaGenericAutoTest.xml

8 tests were completed in 5ms with 8 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.generic.LegacySchemaGenericAutoTest 8✅ 5ms

✅ sttp.tapir.generic.LegacySchemaGenericAutoTest

✅ should find schema for value classes
✅ should find schema for collections of value classes
✅ should find schema for map of value classes
✅ should find schema for recursive data structure
✅ should find schema for recursive data structure when invoked from many threads
✅ should find schema for recursive coproduct type
✅ should support derivation of recursive schemas wrapped with an option
✅ should support derivation of recursive schemas wrapped with a collection

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.generic.MultipartCodecDerivationTest.xml

13 tests were completed in 2ms with 13 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.generic.MultipartCodecDerivationTest 13✅ 2ms

✅ sttp.tapir.generic.MultipartCodecDerivationTest

✅ should generate a codec for a one-arg case class
✅ should generate a codec for a two-arg case class
✅ should generate a codec for a case class with optional parameters
✅ should use the right schema for a case class with part metadata
✅ should generate a codec for a one-arg case class using snake-case naming transformation
✅ should generate a codec for a one-arg case class using screaming-snake-case naming transformation
✅ should generate a codec for a one-arg case class with list
✅ should generate a codec for a case class with part metadata
✅ should generate a codec for a one-arg case class with implicit validator
✅ should generate a codec with a custom field name
✅ should generate a codec for a case class with file part
✅ should use the right schema for an optional file part with metadata 2
✅ should use the right schema for a two-arg case class

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.generic.SchemaGenericAutoTest.xml

29 tests were completed in 0ms with 29 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.generic.SchemaGenericAutoTest 29✅ 0ms

✅ sttp.tapir.generic.SchemaGenericAutoTest

✅ Schema auto derivation should find schema for simple types
✅ Schema auto derivation should find schema for optional types
✅ Schema auto derivation should find schema for collections
✅ Schema auto derivation should find schema for collections of case classes
✅ Schema auto derivation should find schema for a simple case class
✅ Schema auto derivation should find schema for a simple case class and use identity naming transformation
✅ Schema auto derivation should find schema for a nested case class
✅ Schema auto derivation should find schema for case classes with collections
✅ Schema auto derivation should use custom schema for custom types
✅ Schema auto derivation should derive schema for parametrised type classes
✅ Schema auto derivation should find schema for map
✅ Schema auto derivation should find schema for map of products
✅ Schema auto derivation should find schema for map of generic products
✅ Schema auto derivation should add meta-data to schema from annotations
✅ Schema auto derivation should find the right schema for a case class with simple types
✅ Schema auto derivation should find schema for a simple case class and use snake case naming transformation
✅ Schema auto derivation should find schema for a simple case class and use screaming snake case naming transformation
✅ Schema auto derivation should find schema for a simple case class and use kebab case naming transformation
✅ Schema auto derivation should not transform names which are annotated with a custom name
✅ Schema auto derivation should customise the schema using the given function
✅ Schema auto derivation should generate one-of schema using the given discriminator
✅ Schema auto derivation should generate one-of schema using the given discriminator (kebab case subtype names)
✅ Schema auto derivation should generate one-of schema using the given discriminator (snake case subtype names)
✅ Schema auto derivation should generate one-of schema using the given discriminator (screaming snake case subtype names)
✅ Schema auto derivation should generate one-of schema using the given discriminator (full subtype names)
✅ Schema auto derivation should generate one-of schema using the given discriminator (full kebab case subtype names)
✅ Schema auto derivation should generate one-of schema using the given discriminator (full snake case subtype names)
✅ Schema auto derivation should find schema for subtypes containing parent metadata from annotations
✅ Schema auto derivation should add validators for collection and option elements

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.generic.ValueClassCodecDerivationTest.xml

1 tests were completed in 0ms with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.generic.ValueClassCodecDerivationTest 1✅ 0ms

✅ sttp.tapir.generic.ValueClassCodecDerivationTest

✅ should derive codec for value classes

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.internal.RichEndpointInputTest.xml

5 tests were completed in 0ms with 5 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.internal.RichEndpointInputTest 5✅ 0ms

✅ sttp.tapir.internal.RichEndpointInputTest

✅ pathTo should find path to self
✅ pathTo should not find path to non existing input
✅ pathTo should find path to input down the hierarchy
✅ pathTo should find path to input from the middle of hierarchy
✅ pathTo should find path to the middle of hierarchy

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.internal.RichEndpointOutputTest.xml

1 tests were completed in 0ms with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.internal.RichEndpointOutputTest 1✅ 0ms

✅ sttp.tapir.internal.RichEndpointOutputTest

✅ output media type should match content type with lower and upper case charset

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.internal.UrlencodedDataTest.xml

4 tests were completed in 1ms with 4 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.internal.UrlencodedDataTest 4✅ 1ms

✅ sttp.tapir.internal.UrlencodedDataTest

✅ should handle empty string
✅ should handle single parameter
✅ should handle two parameters
✅ should handle complex data

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.LegacySchemaApplyValidationTest.xml

1 tests were completed in 1ms with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.LegacySchemaApplyValidationTest 1✅ 1ms

✅ sttp.tapir.LegacySchemaApplyValidationTest

✅ should validate recursive values with two-level hierarchy

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.namespacing.SchemaMacroNamespaceTest.xml

2 tests were completed in 0ms with 2 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.namespacing.SchemaMacroNamespaceTest 2✅ 0ms

✅ sttp.tapir.namespacing.SchemaMacroNamespaceTest

✅ should compile macro-generated code using derivedEnumeration in a package other than sttp.tapir
✅ should compile macro-generated code for shadowed _root_.scala names

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.SchemaAnnotationsTest.xml

1 tests were completed in 0ms with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.SchemaAnnotationsTest 1✅ 0ms

✅ sttp.tapir.SchemaAnnotationsTest

✅ SchemaAnnotations enrich should derive schema annotations and enrich schema

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.SchemaApplyValidationTest.xml

13 tests were completed in 436ms with 13 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.SchemaApplyValidationTest 13✅ 436ms

✅ sttp.tapir.SchemaApplyValidationTest

✅ should validate openProduct
✅ should validate option
✅ should validate iterable
✅ should validate array
✅ should skip collection validation for array if element validator is passing
✅ should skip collection validation for iterable if element validator is passing
✅ should validate product
✅ should use validators defined when modifying the schema
✅ should validate recursive values
✅ should show recursive validators
✅ should validate either
✅ should validate mapped either
✅ should validate oneOf object

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.SchemaMacroTest.xml

26 tests were completed in 2ms with 26 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.SchemaMacroTest 26✅ 2ms

✅ sttp.tapir.SchemaMacroTest

✅ apply modification should modify basic schema
✅ apply modification should modify product schema
✅ apply modification should modify product schema with derivation
✅ apply modification should modify nested product schema
✅ apply modification should modify array elements in products
✅ apply modification should modify array in products
✅ apply modification should support chained modifications
✅ apply modification should modify optional parameter
✅ apply modification should modify property of optional parameter
✅ apply modification should modify property of open product
✅ apply modification should modify open product
✅ apply modification should create a map schema with string keys
✅ apply modification should create a map schema with non-string keys
✅ apply modification should work with custom naming configuration
✅ apply modification should Not propagate type encodedName to subtypes of a sealed trait, but keep inheritance for fields
✅ apply modification should add discriminator based on a trait method
✅ apply modification should extract type params for discriminator based on a trait method
✅ apply modification should add the discriminator as a field when using oneOfUsingField
✅ apply modification should create a one-of wrapped schema
✅ apply modification should create a schema using oneOfField given an enum extractor
✅ apply modification should create and enrich a schema for an enum
✅ apply modification should derive schema for a scala enumeration and enrich schema
✅ apply modification should derive a customised schema for a scala enumeration and enrich schema
✅ apply default should add default to product
✅ apply example should add example to product
✅ apply description should add description to product

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.SchemaMacroTest2.xml

5 tests were completed in 27ms with 5 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.SchemaMacroTest2 5✅ 27ms

✅ sttp.tapir.SchemaMacroTest2

✅ should derive schema for a simple value classes
✅ should derive schema for numeric value class with format
✅ should derive schema for a class containing a value class
✅ should derive schema for a class containing a value class with a list of value classes
✅ should fail to derive schema for nested generic value class with meaningful msg

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.SchemaTest.xml

13 tests were completed in 2ms with 13 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.SchemaTest 13✅ 2ms

✅ sttp.tapir.SchemaTest

✅ should modify basic schema
✅ should modify product schema
✅ should modify nested product schema
✅ should modify array elements in products
✅ should modify array in products
✅ should modify property of optional parameter
✅ should modify property of map value
✅ should modify open product schema
✅ should generate one-of schema using the given discriminator
✅ should addDiscriminatorField should only add discriminator field to child schemas if not yet present
✅ should propagate format for optional schemas
✅ should generate correct names for Eithers with parameterized types
✅ should generate correct names for Maps with parameterized types

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.typelevel.MatchTypeTest.xml

8 tests were completed in 1s with 8 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.typelevel.MatchTypeTest 8✅ 1s

✅ sttp.tapir.typelevel.MatchTypeTest

✅ MatchType should provide implicit for basic type
✅ MatchType should provide implicit for all primitive class returning true for other primitive type
✅ MatchType should provide implicit for all primitive class returning false for any other primitive type
✅ MatchType should provide implicit for case class
✅ MatchType should provide implicit for sealed stuff
✅ MatchType should provide implicit for complex nested type
✅ MatchType should provide implicit for recursive structure
✅ MatchType should work for list

✅ core/target/native-2.12/test-reports/TEST-sttp.tapir.ValidatorTest.xml

28 tests were completed in 2ms with 28 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.ValidatorTest 28✅ 2ms

✅ sttp.tapir.ValidatorTest

✅ should validate for min value
✅ should validate for min value (exclusive)
✅ should validate for max value
✅ should validate for max value (exclusive)
✅ should validate for positive value
✅ should validate for positiveOrZero value
✅ should validate for negative value
✅ should validate for in range value
✅ should validate for maxSize of collection
✅ should validate for minSize of collection
✅ should validate for nonEmpty of collection
✅ should validate for fixedSize of collection
✅ should validate for matching regex pattern
✅ should validate for minLength of string
✅ should validate for minLength of string and include unicode characters
✅ should validate for maxLength of string
✅ should validate for maxLength of string and include unicode characters
✅ should validate for fixedLength of string
✅ should validate for fixedLength of string and include unicode characters
✅ should validate for nonEmptyString of string
✅ should validate with reject
✅ should validate with any of validators
✅ should validate with all of validators
✅ should validate with custom validator
✅ should validate coproduct enum
✅ should derive for branched sealed traits where all leafs are objects
✅ should not compile for malformed coproduct enum
✅ should validate closed set of ints

✅ integrations/zio-prelude/target/native-2.12/test-reports/TEST-sttp.tapir.codec.zio.prelude.newtype.TapirNewtypeSupportTest.xml

8 tests were completed in 1ms with 8 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.codec.zio.prelude.newtype.TapirNewtypeSupportTest 8✅ 1ms

✅ sttp.tapir.codec.zio.prelude.newtype.TapirNewtypeSupportTest

✅ should find schema for Newtype which is equal to the schema of its underlying value
✅ should find schema for Subtype which is equal to the schema of its underlying value
✅ Provided PlainText codec for a Newtype should equal to the codec of its underlying value
✅ Provided PlainText codec for a Newtype should correctly deserialize everything it serializes
✅ Provided PlainText codec for a Newtype should not deserialize values that do not pass validation
✅ Provided PlainText codec for a Subtype should equal to the codec of its underlying value
✅ Provided PlainText codec for a Subtype should correctly deserialize everything it serializes
✅ Provided PlainText codec for a Subtype should not deserialize values that do not pass validation

✅ integrations/zio-prelude/target/native-2.12/test-reports/TEST-sttp.tapir.codec.zio.prelude.newtype.TapirNewtypeTest.xml

8 tests were completed in 0ms with 8 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.codec.zio.prelude.newtype.TapirNewtypeTest 8✅ 0ms

✅ sttp.tapir.codec.zio.prelude.newtype.TapirNewtypeTest

✅ should find schema for Newtype which is equal to the schema of its underlying value
✅ should find schema for Subtype which is equal to the schema of its underlying value
✅ Provided PlainText codec for a Newtype should equal to the codec of its underlying value
✅ Provided PlainText codec for a Newtype should correctly deserialize everything it serializes
✅ Provided PlainText codec for a Newtype should not deserialize values that do not pass validation
✅ Provided PlainText codec for a Subtype should equal to the codec of its underlying value
✅ Provided PlainText codec for a Subtype should correctly deserialize everything it serializes
✅ Provided PlainText codec for a Subtype should not deserialize values that do not pass validation

✅ integrations/zio/target/native-2.12/test-reports/TEST-sttp.tapir.ztapir.ZioServerSentEventsTest.xml

No tests found

Test suite Passed Failed Skipped Time
sttp.tapir.ztapir.ZioServerSentEventsTest 0ms

✅ integrations/zio/target/native-2.12/test-reports/TEST-sttp.tapir.ztapir.ZTapirTest.xml

No tests found

Test suite Passed Failed Skipped Time
sttp.tapir.ztapir.ZTapirTest 0ms

✅ json/zio/target/native-2.12/test-reports/TEST-sttp.tapir.json.zio.TapirJsonZioTest.xml

8 tests were completed in 49ms with 8 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.json.zio.TapirJsonZioTest 8✅ 49ms

✅ sttp.tapir.json.zio.TapirJsonZioTest

✅ should encode and decode Scala case class with non-empty Option elements
✅ should encode and decode Scala case class with empty Option elements
✅ should encode and decode Scala case class with list
✅ should encode to non-prettified Json
✅ should return a JSON specific error on object decode failure
✅ should return a JSON specific error on array decode failure
✅ should return a coproduct schema for a JsonValue
✅ should return a coproduct schema for a JsonObject

✅ server/core/target/native-2.12/test-reports/TEST-sttp.tapir.server.interceptor.cors.CORSConfigTest.xml

2 tests were completed in 0ms with 2 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.server.interceptor.cors.CORSConfigTest 2✅ 0ms

✅ sttp.tapir.server.interceptor.cors.CORSConfigTest

✅ CORS config should provide a valid default config
✅ CORS config should detect an invalid config

✅ server/core/target/native-2.12/test-reports/TEST-sttp.tapir.server.interceptor.cors.CORSInterceptorTest.xml

2 tests were completed in 3ms with 2 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.server.interceptor.cors.CORSInterceptorTest 2✅ 3ms

✅ sttp.tapir.server.interceptor.cors.CORSInterceptorTest

✅ A custom CORS interceptor should be created with a valid config
✅ A custom CORS interceptor should not be created with an invalid config

✅ server/core/target/native-2.12/test-reports/TEST-sttp.tapir.server.interceptor.decodefailure.DefaultDecodeFailureHandlerTest.xml

5 tests were completed in 1ms with 5 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.server.interceptor.decodefailure.DefaultDecodeFailureHandlerTest 5✅ 1ms

✅ sttp.tapir.server.interceptor.decodefailure.DefaultDecodeFailureHandlerTest

✅ should create a validation error message for a nested field
✅ should create a validation error message including encoded enumeration values
✅ should create an error message including failed json paths
✅ should create an error message including failed multipart parts
✅ should enclose string values in error messages in quotes

✅ server/core/target/native-2.12/test-reports/TEST-sttp.tapir.server.interpreter.DecodeBasicInputsTest.xml

1 tests were completed in 26ms with 1 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.server.interpreter.DecodeBasicInputsTest 1✅ 26ms

✅ sttp.tapir.server.interpreter.DecodeBasicInputsTest

✅ should return an error if decoding throws an exception

✅ server/core/target/native-2.12/test-reports/TEST-sttp.tapir.server.interpreter.FilterServerEndpointsTest.xml

9 tests were completed in 0ms with 9 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.server.interpreter.FilterServerEndpointsTest 9✅ 0ms

✅ sttp.tapir.server.interpreter.FilterServerEndpointsTest

✅ should filter endpoints with a single fixed path component
✅ should filter endpoints with an empty fixed path component
✅ should not filter endpoints without any path component
✅ should filter endpoints with multiple fixed path components
✅ should filter endpoints with a single fixed and a single path capture component
✅ should filter endpoints with multiple fixed and single capture components
✅ should filter endpoints with multiple fixed and capture components
✅ should filter endpoints with fixed and paths components
✅ should filter endpoints with fixed, capture and paths components

✅ server/core/target/native-2.12/test-reports/TEST-sttp.tapir.server.interpreter.ServerInterpreterTest.xml

3 tests were completed in 1ms with 3 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
sttp.tapir.server.interpreter.ServerInterpreterTest 3✅ 1ms

✅ sttp.tapir.server.interpreter.ServerInterpreterTest

✅ should call the interceptors in the correct order
✅ should decode security inputs, basic regular inputs, and not decode the body, when security logic fails
✅ should use a customized reject interceptor