Skip to content

Commit

Permalink
Improve JsonSchema.Object.addAll
Browse files Browse the repository at this point in the history
  • Loading branch information
guizmaii committed Aug 23, 2024
1 parent 0a00532 commit 624674f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1215,6 +1215,8 @@ object JsonSchema {
def addAll(value: Chunk[(java.lang.String, JsonSchema)]): Object =
value.foldLeft(this) { case (obj, (name, schema)) =>
schema match {
case Object(properties, additionalProperties, _) if properties.isEmpty && additionalProperties.isRight =>
obj.copy(properties = obj.properties + (name -> schema))
case Object(properties, additionalProperties, required) =>
obj.copy(
properties = obj.properties ++ properties,
Expand Down

4 comments on commit 624674f

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 : Performance Benchmarks (SimpleEffectBenchmarkServer)

concurrency: 256
requests/sec: 339302

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 : Performance Benchmarks (PlainTextBenchmarkServer)

concurrency: 256
requests/sec: 328545

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 : Performance Benchmarks (SimpleEffectBenchmarkServer)

concurrency: 256
requests/sec: 334463

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 : Performance Benchmarks (PlainTextBenchmarkServer)

concurrency: 256
requests/sec: 327365

Please sign in to comment.