捕梦者基础框架API接口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
ahbmz 66dcc43388 初始化版本 4 years ago
..
example-object 初始化版本 4 years ago
misc 初始化版本 4 years ago
openapi-spec 初始化版本 4 years ago
petstore-3.0 初始化版本 4 years ago
petstore.swagger.io 初始化版本 4 years ago
schema-query-parameter-processor 初始化版本 4 years ago
swagger-spec 初始化版本 4 years ago
using-interfaces 初始化版本 4 years ago
using-refs 初始化版本 4 years ago
using-traits 初始化版本 4 years ago
Readme.md 初始化版本 4 years ago

Readme.md

Code/Annotation examples

Collection of code/annotation examples and their corresponding OpenAPI specs generated using swagger-php.

Custom processors

Processors implement the various steps involved in converting annotations into an OpenAPI spec.

Writing a custom processor is the recommended way to extend swagger-php in a clean way.

Processors are expected to implement the __invoke() method expecting the current Analysis object as single parameter:

<?php
...
use OpenApi\Analysis;
...

class MyCustomProcessor
{
    public function __invoke(Analysis $analysis)
    {
        // custom processing    
    }
}
  • schema-query-parameter-processor

    A processor that takes a vendor tag (expecting a schema #ref) and injects all properties of that given schema as query parameter to the request definition.

    source