- Issue created by @pdureau
- Merge request !234Issue #3478655 by pdureau: Component converter: don't overuse schema references → (Merged) created by pdureau
Automatically closed - issue fixed for 2 weeks with no activity.
The migration drush command from ui_patterns_legacy is currently putting a reference at every prop.
Example:
props:
type: object
properties:
active:
title: "Active?"
description: "It is possible to set button as active?"
$ref: "ui-patterns://boolean"
size:
title: Size
description: "It is possible to set the size of buttons."
$ref: "ui-patterns://enum"
enum:
- xs
- sm
- md
- lg
"meta:enum":
xs: "Extra small"
sm: Small
md: Medium
lg: Large
url:
title: URL
description: "The button URL. Optional."
$ref: "ui-patterns://url"
https://git.drupalcode.org/project/ui_suite_daisyui/-/blob/4.0.x/compone...
However, some references provide the same schema as a simple JSON type:
$ref: "ui-patterns://boolean"
is the same as type: boolean
according to$ref: "ui-patterns://string"
is the same as type: string
according to StringPropType
Let's update the drush command to put the JSON type instead of the references.
The straightforward changes:
$ref: "ui-patterns://boolean"
by type: boolean
.
$ref: "ui-patterns://string"
by type: string
Also, we need to try it before, but all $ref: "ui-patterns://number"
could be replaced by type: number
or type: integer
according to the context.
And $ref: "ui-patterns://enum"
could be replaced by type: string
, type: number
or type: integer
according to the context.
Active
2.0
Code
Automatically closed - issue fixed for 2 weeks with no activity.