Skip to content

Commit

Permalink
Merge pull request #71 from nextcloud/fix/merge-specs/value-cast
Browse files Browse the repository at this point in the history
  • Loading branch information
provokateurin authored Jan 12, 2024
2 parents 3c90fce + 83745aa commit 59b4d32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions merge-specs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ function loadSpec(string $path): array {

function rewriteRefs(array $spec): array {
$readableAppID = Helpers::generateReadableAppID($spec["info"]["title"]);
array_walk_recursive($spec, function (string &$item, string $key) use ($readableAppID) {
if ($key == "\$ref" && $item != "#/components/schemas/OCSMeta") {
array_walk_recursive($spec, function (mixed &$item, string $key) use ($readableAppID) {
if ($key === '$ref' && $item !== '#/components/schemas/OCSMeta') {
$item = str_replace("#/components/schemas/", "#/components/schemas/" . $readableAppID, $item);
}
});
Expand Down

0 comments on commit 59b4d32

Please sign in to comment.