Skip to content

Fix custom array schema#567

Closed
cnizzardini wants to merge 2 commits intomasterfrom
fix-custom-array-schema
Closed

Fix custom array schema#567
cnizzardini wants to merge 2 commits intomasterfrom
fix-custom-array-schema

Conversation

@cnizzardini
Copy link
Copy Markdown
Owner

@cnizzardini cnizzardini commented Apr 6, 2025

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 closed this Apr 6, 2025
@cnizzardini cnizzardini deleted the fix-custom-array-schema branch April 6, 2025 14:35
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