Skip to content

Commit af34e72

Browse files
authored
fix(openapi): yaml openapi export should have numeric keys as string (#6436)
1 parent c922ba3 commit af34e72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/OpenApi/Command/OpenApiCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
5757
'spec_version' => $input->getOption('spec-version'),
5858
]);
5959
$content = $input->getOption('yaml')
60-
? Yaml::dump($data, 10, 2, Yaml::DUMP_OBJECT_AS_MAP | Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE | Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK)
60+
? Yaml::dump($data, 10, 2, Yaml::DUMP_OBJECT_AS_MAP | Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE | Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK | Yaml::DUMP_NUMERIC_KEY_AS_STRING)
6161
: (json_encode($data, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES) ?: '');
6262

6363
$filename = $input->getOption('output');

0 commit comments

Comments
 (0)