diff --git a/SwaggerApiAction.php b/OpenAPIRenderer.php similarity index 93% rename from SwaggerApiAction.php rename to OpenAPIRenderer.php index 19216b2..625828f 100644 --- a/SwaggerApiAction.php +++ b/OpenAPIRenderer.php @@ -10,11 +10,11 @@ use yii\web\Response; /** - * Class SwaggerApiAction + * Class OpenAPIRenderer is responsible for generating the JSON spec. * - * @package yii2mod\swagger + * @package yii2mod\swagger\actions */ -class SwaggerApiAction extends Action +class OpenAPIRenderer extends Action { /** * @var string|array|\Symfony\Component\Finder\Finder The directory(s) or filename(s). diff --git a/README.md b/README.md index 6cf8800..2c5b4e4 100644 --- a/README.md +++ b/README.md @@ -61,11 +61,11 @@ class SiteController extends Controller { return [ 'docs' => [ - 'class' => 'yii2mod\swagger\SwaggerAction', + 'class' => 'yii2mod\swagger\SwaggerUIRenderer', 'restUrl' => Url::to(['site/json-schema']), ], 'json-schema' => [ - 'class' => 'yii2mod\swagger\SwaggerApiAction', + 'class' => 'yii2mod\swagger\OpenAPIRenderer', // Тhe list of directories that contains the swagger annotations. 'scanDir' => [ Yii::getAlias('@app/controllers'), diff --git a/SwaggerAction.php b/SwaggerUIRenderer.php similarity index 90% rename from SwaggerAction.php rename to SwaggerUIRenderer.php index 839d32c..7b40161 100644 --- a/SwaggerAction.php +++ b/SwaggerUIRenderer.php @@ -5,11 +5,11 @@ use yii\base\Action; /** - * Class SwaggerAction + * Class SwaggerUIRenderer renders the UI (HTML/JS/CSS). * * @package yii2mod\swagger */ -class SwaggerAction extends Action +class SwaggerUIRenderer extends Action { /** * @var string the rest url configuration