versao compilada 1
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-16 09:17:28 +02:00
parent c13f250b87
commit 6a76aac80f
901 changed files with 253428 additions and 252 deletions
@@ -58,6 +58,7 @@ class OpportunityCanonicalContract
}
$schema = app(OpportunityCategoryFields::class)->enrich($schema);
$schema = app(OpportunityModularProfiles::class)->extend($schema);
$schema = app(OpportunityClassification::class)->extend($schema);
$schema = $this->writeSchema($schema, $draft);
$properties = &$schema['$defs']['opportunityCreate']['properties'];
unset($properties['mutation_context']); // Actor, audit reason and revision are server-owned.
@@ -213,6 +214,9 @@ class OpportunityCanonicalContract
*/
private function schemaData(mixed $value, array $node, array $defs): mixed
{
if (($node['x-investmoz-classification'] ?? false) && is_array($value)) {
$node = isset($value['classification']) ? $defs['relationCreate'] : ['type' => 'object'];
}
if (isset($node['$ref'])) {
$name = basename($node['$ref']);
$node = $defs[$name] ?? $node;
@@ -543,6 +547,7 @@ class OpportunityCanonicalContract
return ['version' => self::VERSION, 'modularProfiles' => app(OpportunityModularProfiles::class)->enabled() ? OpportunityModularProfiles::PROFILES : [],
'historyVersion' => app(OpportunityModularProfiles::class)->enabled() ? OpportunityModularProfiles::HISTORY_VERSION : null,
'classification' => app(OpportunityClassification::class)->options(),
'schema' => $this->schema(true)['$defs']['opportunityCreate'],
'definitions' => $this->schema(true)['$defs'],
'submissionTextLimits' => ['demand_statement' => array_intersect_key($submissionProperties['demand_statement'], array_flip(['minLength', 'maxLength']))],