Repository navigation
Support OpenAPI 3.0 schema objects - #1309
Conversation
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
|
This pull request is abnormally large and would use a significant amount of tokens to review. If you still wish to review it, comment "augment review" and we will review it. |
|
augment review |
🤖 Augment PR SummarySummary: This PR adds support for OpenAPI 3.0 Schema Objects. These schemas cannot declare their dialect with Changes:
Technical Notes: Because OAS 3.0 artifacts no longer contain 🤖 Was this summary useful? React with 👍 or 👎 |
| const auto &root_location{frame.root_location().value().get()}; | ||
| const auto &root_vocabularies{frame.vocabularies(root_location, subresolver)}; | ||
|
|
||
| if (dialect_defines(root_vocabularies, "$schema")) { |
There was a problem hiding this comment.
Since an OAS 3.0 schema is now returned with no $schema, it can only be read correctly by callers that pass its dialect in from outside. A schema in a different dialect that $refs it (e.g. modern.json (2020-12) referencing identifier, a playground schema, or a conversion closure) will frame, compile and bundle the target under the referrer's dialect, so nullable/boolean exclusiveMinimum get the wrong meaning or fail metaschema checks. Consider how cross-dialect references to these schemas should keep their dialect, for example when bundling or when the subresolver is called, or explicitly reject them.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
There was a problem hiding this comment.
Benchmark (community)
Details
| Benchmark suite | Current: a87f797 | Previous: 12328ab | Ratio |
|---|---|---|---|
Add one schema (0 existing) |
149 ms |
254 ms |
0.59 |
Add one schema (100 existing) |
32 ms |
37 ms |
0.86 |
Add one schema (1000 existing) |
72 ms |
75 ms |
0.96 |
Add one schema (10000 existing) |
661 ms |
535 ms |
1.24 |
Update one schema (1 existing) |
22 ms |
32 ms |
0.69 |
Update one schema (101 existing) |
32 ms |
37 ms |
0.86 |
Update one schema (1001 existing) |
81 ms |
80 ms |
1.01 |
Update one schema (10001 existing) |
646 ms |
543 ms |
1.19 |
Cached rebuild (1 existing) |
9 ms |
9 ms |
1 |
Cached rebuild (101 existing) |
12 ms |
10 ms |
1.20 |
Cached rebuild (1001 existing) |
35 ms |
35 ms |
1 |
Cached rebuild (10001 existing) |
232 ms |
184 ms |
1.26 |
Index 100 schemas |
345 ms |
316 ms |
1.09 |
Index 1000 schemas |
819 ms |
1067 ms |
0.77 |
Index 10000 schemas |
9068 ms |
10081 ms |
0.90 |
Index 10000 schemas (custom meta-schema) |
10768 ms |
13424 ms |
0.80 |
Index 10000 schemas ($ref fan-out) |
10240 ms |
12314 ms |
0.83 |
test/e2e/html: Schema Fetch (p50) |
203 us |
295 us |
0.69 |
test/e2e/html: Schema Fetch (p99) |
243 us |
365 us |
0.67 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Benchmark (enterprise)
Details
| Benchmark suite | Current: a87f797 | Previous: 12328ab | Ratio |
|---|---|---|---|
Add one schema (0 existing) |
540 ms |
604 ms |
0.89 |
Add one schema (100 existing) |
125 ms |
123 ms |
1.02 |
Add one schema (1000 existing) |
178 ms |
171 ms |
1.04 |
Add one schema (10000 existing) |
793 ms |
779 ms |
1.02 |
Update one schema (1 existing) |
108 ms |
110 ms |
0.98 |
Update one schema (101 existing) |
121 ms |
122 ms |
0.99 |
Update one schema (1001 existing) |
183 ms |
179 ms |
1.02 |
Update one schema (10001 existing) |
843 ms |
821 ms |
1.03 |
Cached rebuild (1 existing) |
13 ms |
14 ms |
0.93 |
Cached rebuild (101 existing) |
17 ms |
17 ms |
1 |
Cached rebuild (1001 existing) |
52 ms |
43 ms |
1.21 |
Cached rebuild (10001 existing) |
318 ms |
302 ms |
1.05 |
Index 100 schemas |
757 ms |
718 ms |
1.05 |
Index 1000 schemas |
1842 ms |
1876 ms |
0.98 |
Index 10000 schemas |
16273 ms |
16208 ms |
1.00 |
Index 10000 schemas (custom meta-schema) |
16309 ms |
16106 ms |
1.01 |
Index 10000 schemas ($ref fan-out) |
20918 ms |
20989 ms |
1.00 |
enterprise/e2e/auth: Schema Anonymous (p50) |
391 us |
398 us |
0.98 |
enterprise/e2e/auth: Schema Anonymous (p99) |
507 us |
506 us |
1.00 |
enterprise/e2e/auth: Schema API Key Identity (p50) |
395 us |
402 us |
0.98 |
enterprise/e2e/auth: Schema API Key Identity (p99) |
510 us |
514 us |
0.99 |
enterprise/e2e/auth: Schema API Key SHA256 (p50) |
400 us |
408 us |
0.98 |
enterprise/e2e/auth: Schema API Key SHA256 (p99) |
525 us |
521 us |
1.01 |
enterprise/e2e/auth: Schema JWT (p50) |
524 us |
533 us |
0.98 |
enterprise/e2e/auth: Schema JWT (p99) |
675 us |
684 us |
0.99 |
test/e2e/html: Schema Fetch (p50) |
395 us |
403 us |
0.98 |
test/e2e/html: Schema Fetch (p99) |
490 us |
505 us |
0.97 |
This comment was automatically generated by workflow using github-action-benchmark.
Signed-off-by: Juan Cruz Viotti jv@jviotti.com