Commit 9fbf776
committed
Rolling back to mapping unknown
To avoid BC breaks, we defer this fix to #3403
> **API Platform version(s) affected**: 2.5.x
>
> **Description**
>
> In our tests for `TypeFactory`:
>
> ```
>
> yield [['type' => 'string'], new Type(Type::BUILTIN_TYPE_OBJECT)];
> yield [['type' => 'string'], new Type(Type::BUILTIN_TYPE_OBJECT, true)];
>
> // ...
>
> yield [['type' => 'string'], new Type(Type::BUILTIN_TYPE_OBJECT, false, Dummy::class)];
> yield [['type' => 'string'], new Type(Type::BUILTIN_TYPE_OBJECT, true, Dummy::class)];
> ```
>
> While reviewing #3402, @dunglas found a potential BC break with objects that may be used in URIs as `string`s (therefore not `objects`):
>
> * [#3402 (comment)](#3402 (comment))
>
> * [#3402 (comment)](#3402 (comment))
>
>
> **How to reproduce**
>
> The test should instead convert `object` to `object`:
>
> ```
>
> yield [['type' => 'object'], new Type(Type::BUILTIN_TYPE_OBJECT)];
> yield [['type' => 'object'], new Type(Type::BUILTIN_TYPE_OBJECT, true)];
>
> // ...
>
> yield [['type' => 'object'], new Type(Type::BUILTIN_TYPE_OBJECT, false, Dummy::class)];
> yield [['type' => 'object'], new Type(Type::BUILTIN_TYPE_OBJECT, true, Dummy::class)];
> ```object types as JSON-Schema {"type": "string"}
1 parent cc8dc66 commit 9fbf776
File tree
2 files changed
+10
-10
lines changed- src/JsonSchema
- tests/JsonSchema
2 files changed
+10
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
164 | | - | |
| 163 | + | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
169 | | - | |
| 168 | + | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| |||
0 commit comments