feat: harden OpenAPI contracts for SDK generators#7662
Merged
vitormattos merged 9 commits intomainfrom May 6, 2026
Merged
Conversation
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
SignRequest.getMetadata() stores notify history as array<{date: int, method: string}> entries.
The previous SignerMetadata union type caused swagger-test to attempt DynamicMetadataValue
scalar validation on the notify array, producing 'Array to string conversion' PHP warnings
in FileControllerTest (6× matchNumber, 3× matchBool per test run).
Changes:
- LibresignNotify.date: string -> non-negative-int (runtime stores Unix timestamp via time())
- LibresignNotify: add optional description field (stored when SignRequest has description)
- LibresignSignerMetadata: add notify?: LibresignNotify[] to known-fields branch
- LibresignSignerMetadata: remove |array<string, DynamicMetadataValue> fallback (all actual
keys are now covered by the known-fields branch)
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Member
Author
|
/backport to stable33 |
Member
Author
|
/backport to stable32 |
This was referenced May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mixedmetadata aliases with explicit SDK-friendly metadata contractsarray<empty>toarray{}Changes
lib/ResponseDefinitions.phpLibresignDynamicMetadataValueLibresignSignerCertificateInfoLibresignSignerMetadataLibresignSignerDetail.metadata?: mixedwithmetadata?: LibresignSignerMetadataLibresignFileRuntimeMetadata = ...|array<string, mixed>with...|array<string, LibresignDynamicMetadataValue>lib/Controller/IdDocsController.php@returnsuccess contracts changed fromarray<empty>toarray{}for add/delete endpointsopenapi.jsonopenapi-full.jsonsrc/types/openapi/openapi.tssrc/types/openapi/openapi-full.tsValidation Executed
composer psalm(container)composer openapi(container)composer cs:fix(container)npm run lintnpm run stylelintnpm testAll commands completed successfully.