We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2dee471 commit e096619Copy full SHA for e096619
src/Constraint/Type.php
@@ -4,6 +4,7 @@
4
5
class Type implements Constraint
6
{
7
+ // TODO deprecate in favour of JsonSchema::<TYPE> ?
8
const OBJECT = 'object';
9
const STRING = 'string';
10
const INTEGER = 'integer';
src/Util/SwaggerSchemaAdapter.php
@@ -0,0 +1,14 @@
1
+<?php
2
+
3
+namespace Swaggest\JsonSchema\Util;
+use Swaggest\JsonSchema\Schema as JsonBasicSchema;
+use Swaggest\JsonSchema\SwaggerSchema\Schema;
+class SwaggerSchemaAdapter extends JsonBasicSchema
+{
+ public static function convert(Schema $schema)
11
+ {
12
+ return JsonBasicSchema::import(Schema::export($schema));
13
+ }
14
+}
0 commit comments