PHP 클래스 Scalr\Tests\Functional\Api\V2\SpecSchema\Constraint\Validator

Validate SpecObject created form swagger specification with api response
부터: 5.11 (03.12.2015)
저자: Andrii Penchuk ([email protected])
파일 보기 프로젝트 열기: scalr/scalr 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$errors array List of errors
$ignoreDiscriminatorValues array Mark test incomplete this discriminator not yet implemented
$ignoreEnumVal array List of ignore enum values in test
$ignoreRequiredVal array List of ignore required values This values is required but will not be included in response. Example privateKey in cloud credentials key based on object name in Api definitions

공개 메소드들

메소드 설명
appendError ( string $property, string $message ) Add errors to this validator
check ( mixed $value, AbstractSpecObject $schema ) Invokes the validation of an element
getErrors ( ) : array
isValid ( ) : boolean

보호된 메소드들

메소드 설명
checkItems ( stdClass $element, AbstractSpecObject $schema ) Check each items in element
checkObject ( stdClass $element, AbstractSpecObject $schema ) Validates an object
checkProperty ( mixed $element, Property $schema ) Check property form spec object
checkRequired ( stdClass $element, ObjectEntity $schema ) Check required element
checkSample ( stdClass $element, Property $schema ) Check each sample element
getConcreteTypes ( AbstractSpecObject $schema, string $objectName ) : boolean | AbstractSpecObject if element has concrete type return schema this element

메소드 상세

appendError() 공개 메소드

Add errors to this validator
public appendError ( string $property, string $message )
$property string error property
$message string error message

check() 공개 메소드

Invokes the validation of an element
public check ( mixed $value, AbstractSpecObject $schema )
$value mixed value what we should check
$schema Scalr\Tests\Functional\Api\V2\SpecSchema\DataTypes\AbstractSpecObject schema value generated of api specification

checkItems() 보호된 메소드

Check each items in element
protected checkItems ( stdClass $element, AbstractSpecObject $schema )
$element stdClass the list of items
$schema Scalr\Tests\Functional\Api\V2\SpecSchema\DataTypes\AbstractSpecObject items schema generated of api specification

checkObject() 보호된 메소드

Validates an object
protected checkObject ( stdClass $element, AbstractSpecObject $schema )
$element stdClass object properties
$schema Scalr\Tests\Functional\Api\V2\SpecSchema\DataTypes\AbstractSpecObject schema this object generated of api specification

checkProperty() 보호된 메소드

Check property form spec object
protected checkProperty ( mixed $element, Property $schema )
$element mixed property value
$schema Scalr\Tests\Functional\Api\V2\SpecSchema\DataTypes\Property property schema generated of api specification

checkRequired() 보호된 메소드

Check required element
protected checkRequired ( stdClass $element, ObjectEntity $schema )
$element stdClass object with required element
$schema Scalr\Tests\Functional\Api\V2\SpecSchema\DataTypes\ObjectEntity schema value generated of api specification

checkSample() 보호된 메소드

Check each sample element
protected checkSample ( stdClass $element, Property $schema )
$element stdClass sample element not described in properties
$schema Scalr\Tests\Functional\Api\V2\SpecSchema\DataTypes\Property schema each sample element generated of api specification

getConcreteTypes() 보호된 메소드

if element has concrete type return schema this element
protected getConcreteTypes ( AbstractSpecObject $schema, string $objectName ) : boolean | AbstractSpecObject
$schema Scalr\Tests\Functional\Api\V2\SpecSchema\DataTypes\AbstractSpecObject schema value generated of api specification
$objectName string concrete type name
리턴 boolean | Scalr\Tests\Functional\Api\V2\SpecSchema\DataTypes\AbstractSpecObject

getErrors() 공개 메소드

public getErrors ( ) : array
리턴 array

isValid() 공개 메소드

public isValid ( ) : boolean
리턴 boolean

프로퍼티 상세

$errors 보호되어 있는 프로퍼티

List of errors
protected array $errors
리턴 array

$ignoreDiscriminatorValues 보호되어 있는 정적으로 프로퍼티

Mark test incomplete this discriminator not yet implemented
protected static array $ignoreDiscriminatorValues
리턴 array

$ignoreEnumVal 보호되어 있는 정적으로 프로퍼티

List of ignore enum values in test
protected static array $ignoreEnumVal
리턴 array

$ignoreRequiredVal 보호되어 있는 정적으로 프로퍼티

List of ignore required values This values is required but will not be included in response. Example privateKey in cloud credentials key based on object name in Api definitions
protected static array $ignoreRequiredVal
리턴 array