PHP code example of blumilksoftware / openapi-toolbox
1. Go to this page and download the library: Download blumilksoftware/openapi-toolbox library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
blumilksoftware / openapi-toolbox example snippets
return [
"format" => Format::YmlToJson,
"specification" => [
"path" => resource_path("openapi"),
"index" => "openapi.yml",
"allow_multiple_files" => false,
],
"cache" => [
"enabled" => false,
"documentation_path" => storage_path("framework/cache/openapi"),
"checksum_path" => storage_path("framework/cache/openapi.md5"),
],
"ui" => [
"enabled" => false,
"single_source" => false,
"title" => "Documentation",
"routing" => [
"prefix" => "documentation",
"name" => "documentation",
"middlewares" => [],
],
"provider" => UIProvider::Elements,
"providers" => [
"elements" => [
"script" => [
"src" => "https://unpkg.com/@stoplight/[email protected] /web-components.min.js",
"sri" => "sha384-bwBnouovwwSJc5fWe7VFNxRg+T2lPHhUcHIzdf7mFfqTZkYtM3T/ehzfEr8F02yY",
],
"stylesheet" => [
"href" => "https://unpkg.com/@stoplight/[email protected] /styles.min.css",
"sri" => "sha384-1lLf7J28IOR7k5RlItk6Y+G3hDgVB3y4RCgWNq6ZSwjYfvJXPtZAdW0uklsAZbGW",
],
],
"swagger" => [
"script" => [
"src" => "https://unpkg.com/[email protected] /swagger-ui-bundle.js",
"sri" => "sha384-xy3YXp34ftsoHshRtcUFjOl/M22B5OEHD5S9AjtVzQokz+BxNff8vNW08msKmH46",
],
"stylesheet" => [
"href" => "https://unpkg.com/[email protected] /swagger-ui.css",
"sri" => "sha384-pzdBB6iZwPIzBHgXle+9cgvKuMgtWNrBopXkjrWnKCi3m4uJsPPdLQ4IPMqRDirS",
],
],
],
],
];
php artisan openapi:validate