Skip to content

Fix custom array schema#568

Merged
cnizzardini merged 2 commits intomasterfrom
fix-custom-array-schema-2
Apr 6, 2025
Merged

Fix custom array schema#568
cnizzardini merged 2 commits intomasterfrom
fix-custom-array-schema-2

Conversation

@cnizzardini
Copy link
Copy Markdown
Owner

Fixes custom array schema's resulting in output like this in swagger:

{
  "array_property": [
    "string"
  ]
}

Now supports defining custom array like this:

(new SchemaProperty('foo_schemas', 'array'))->setItems([
    [
        'type' => 'object',
        'allOf' => [['$ref' => '#/components/schemas/FooSchema']]
    ]
]),

outputting...

"foo_schemas": [
  {
    "id": 0,
    "name": "string",
  }
],

@cnizzardini cnizzardini merged commit 56dd2c0 into master Apr 6, 2025
3 of 4 checks passed
@cnizzardini cnizzardini deleted the fix-custom-array-schema-2 branch April 6, 2025 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant