Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(openapi): use 3.1 version#5489

Merged
soyuka merged 1 commit into
api-platform:mainfrom
soyuka:feat/openapi-3.1
Mar 23, 2023
Merged

fix(openapi): use 3.1 version#5489
soyuka merged 1 commit into
api-platform:mainfrom
soyuka:feat/openapi-3.1

Conversation

@soyuka
Copy link
Copy Markdown
Member

@soyuka soyuka commented Mar 23, 2023

Configuration now validates the api keys "key" using the pattern from the OpenAPI 3.1 specification: https://github.com/OAI/OpenAPI-Specification/blob/main/schemas/v3.1/schema.json#L282

->arrayNode('api_keys')
->useAttributeAsKey('key')
->validate()
->ifTrue(static fn($v): bool => empty(array_filter(array_keys($v), fn($item) => preg_match('/^[a-zA-Z0-9._-]+$/', $item))))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
->ifTrue(static fn($v): bool => empty(array_filter(array_keys($v), fn($item) => preg_match('/^[a-zA-Z0-9._-]+$/', $item))))
->ifTrue(static fn($v): bool => !empty(array_filter(array_keys($v), fn($item) => !preg_match('/^[a-zA-Z0-9._-]+$/', $item))))

@soyuka soyuka force-pushed the feat/openapi-3.1 branch from c452950 to 2ca35f2 Compare March 23, 2023 10:23
@soyuka soyuka force-pushed the feat/openapi-3.1 branch from 2ca35f2 to a5a7334 Compare March 23, 2023 10:30
@soyuka soyuka force-pushed the feat/openapi-3.1 branch from a5a7334 to 22541ea Compare March 23, 2023 10:35
@soyuka soyuka merged commit ccef472 into api-platform:main Mar 23, 2023
soyuka added a commit to mrossard/core that referenced this pull request Apr 14, 2023
Deuchnord pushed a commit to Deuchnord/api-platform-core that referenced this pull request Apr 25, 2023
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.

2 participants