Skip to content

Convert to inline spec without using the console command #122

Closed
@antonkomarev

Description

@antonkomarev

Hi @cebe! Thank you for the package, you've done a great job!

I need to fetch openapi files with refs and compile them to the single inline file. I saw there is a way to make it in console command, but I want to do the same just in my controllers.

This is how I tried to make it:

$file = $this->client->repositoryFiles()->getFile($projectId, $filePath, 'master');

$content = base64_decode($file['content']);
$openapi = Reader::readFromYaml($content);

$yaml = Writer::writeToYaml($openapi);
dd($yaml);

But I still have yaml file with refs. How can I fetch all the refs and convert them to the single file?

// Spec files are not public, so readFromYamlFile is returning an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions