Skip to content

Commit

Permalink
Removed JSON-Schema properties that are not supported in swagger. #273
Browse files Browse the repository at this point in the history
  • Loading branch information
bfanger committed Jan 15, 2016
1 parent 87e4536 commit 6b1185e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 41 deletions.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.0.5
- Removed JSON-Schema properties that are not supported in swagger. #273
- Added ordering filenames to guarantee a consistent output #263

## 2.0.4
- Fixed minor regression #254
- Removed format restrictions from the remaining annotations #253
Expand Down
5 changes: 1 addition & 4 deletions src/Annotations/Definition.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ class Definition extends Schema

/** @inheritdoc */
public static $_parents = [
'Swagger\Annotations\Swagger',
'Swagger\Annotations\Schema',
'Swagger\Annotations\Definition',
'Swagger\Annotations\Property',
'Swagger\Annotations\Swagger'
];
}
38 changes: 1 addition & 37 deletions src/Annotations/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,6 @@ class Schema extends AbstractAnnotation
*/
public $uniqueItems;

/**
* http://json-schema.org/latest/json-schema-validation.html#anchor37
* @var boo|array
*/
public $additionalItems;

/**
* See http://json-schema.org/latest/json-schema-validation.html#anchor76.
* @var array
Expand Down Expand Up @@ -204,41 +198,12 @@ class Schema extends AbstractAnnotation
*/
public $allOf;

/**
* An instance validates successfully against this property if it validates successfully against at least one schema defined by this property's value.
* @var Schema[]
*/
public $anyOf;

/**
* An instance validates successfully against this property if it validates successfully against exactly one schema defined by this property's value.
* @var type
*/
public $oneOf;

/**
* An instance is valid against this keyword if it fails to validate successfully against the schema defined by this keyword.
* @var Schema
*/
public $not;

/**
* This property plays no role in validation per se. Its role is to provide a standardized location for schema authors to inline JSON Schemas into a more general schema.
* @var Definition[]
*/
public $definitions;

/**
* http://json-schema.org/latest/json-schema-validation.html#anchor64
* @var bool|object
*/
public $additionalProperties;

/**
* http://json-schema.org/latest/json-schema-validation.html#anchor64
*/
public $patternProperties;

/** @inheritdoc */
public static $_types = [
'description' => 'string',
Expand All @@ -263,8 +228,7 @@ class Schema extends AbstractAnnotation
'Swagger\Annotations\Items' => 'items',
'Swagger\Annotations\Property' => ['properties', 'property'],
'Swagger\Annotations\ExternalDocumentation' => 'externalDocs',
'Swagger\Annotations\Xml' => 'xml',
'Swagger\Annotations\Definition' => ['definitions', 'definition'],
'Swagger\Annotations\Xml' => 'xml'
];

/** @inheritdoc */
Expand Down

0 comments on commit 6b1185e

Please sign in to comment.