From 19f41bd50fd2b789c4a1cbffcdc67d7433e9e388 Mon Sep 17 00:00:00 2001 From: Christoph Kappestein Date: Wed, 9 Oct 2024 21:44:53 +0200 Subject: [PATCH 1/6] start typeschema next migration --- composer.json | 2 +- src/Attribute/ParamAbstract.php | 7 - src/Builder/SpecificationBuilder.php | 6 +- src/Builder/SpecificationBuilderInterface.php | 7 +- src/Generator/Client/LanguageAbstract.php | 3 +- src/Generator/Client/LanguageBuilder.php | 57 ++---- src/Generator/Client/Util/Naming.php | 21 +- src/Generator/Markup/MarkupAbstract.php | 2 +- src/Generator/Server/PHP.php | 22 ++- src/Generator/Server/ServerAbstract.php | 61 ++---- src/Generator/Spec/OpenAPI.php | 30 +-- src/Generator/Spec/TypeAPI.php | 2 +- src/Inspector/ChangelogGenerator.php | 21 +- src/Operation/Argument.php | 10 +- src/Operation/ArgumentInterface.php | 4 +- src/Operation/Arguments.php | 4 - src/Parser/Attribute.php | 108 ++--------- src/Parser/OpenAPI.php | 45 ++--- src/Parser/TypeAPI.php | 4 +- tests/ApiManagerTest.php | 5 +- tests/Console/GenerateCommandTest.php | 8 +- tests/Console/resource/spec_openapi.json | 18 +- tests/Generator/Client/PHPTest.php | 8 - tests/Generator/Client/TypeScriptTest.php | 8 - tests/Generator/Client/resource/php/Entry.php | 7 - .../Client/resource/php/EntryCreate.php | 9 - .../Client/resource/php/EntryDelete.php | 9 - .../Client/resource/php/EntryPatch.php | 9 - .../Client/resource/php/EntryUpdate.php | 9 - .../Client/resource/php_collection/Entry.php | 6 - .../resource/php_collection/EntryCreate.php | 8 - .../resource/php_test/TestMapObject.php | 4 +- .../resource/php_test/TestMapScalar.php | 4 +- .../Client/resource/typescript/Client.ts | 6 +- .../Client/resource/typescript/Entry.ts | 2 +- .../resource/typescript/EntryCollection.ts | 2 +- .../Client/resource/typescript/EntryCreate.ts | 6 +- .../Client/resource/typescript/EntryDelete.ts | 4 +- .../resource/typescript/EntryMessage.ts | 2 +- .../Client/resource/typescript/EntryPatch.ts | 4 +- .../Client/resource/typescript/EntryUpdate.ts | 4 +- .../typescript/MapEntryMessageException.ts | 4 +- .../resource/typescript_collection/Entry.ts | 2 +- .../typescript_collection/EntryCollection.ts | 2 +- .../typescript_collection/EntryCreate.ts | 6 +- .../typescript_collection/EntryMessage.ts | 2 +- .../resource/typescript_import/MySchema.ts | 2 +- .../resource/typescript_test/TestMapObject.ts | 3 +- .../resource/typescript_test/TestMapScalar.ts | 3 +- .../resource/typescript_test/TestObject.ts | 2 +- .../resource/typescript_test/TestRequest.ts | 2 +- .../resource/typescript_test/TestResponse.ts | 2 +- tests/Generator/GeneratorTestCase.php | 183 ++++++++---------- tests/Generator/Markup/resource/client.md | 26 +-- .../Markup/resource/client_collection.md | 12 +- tests/Generator/Markup/resource/html.htm | 14 +- tests/Generator/Markup/resource/markdown.md | 14 +- tests/Generator/Schema/Complex.php | 44 ----- tests/Generator/Schema/Create.php | 3 +- tests/Generator/Schema/Delete.php | 3 +- tests/Generator/Schema/Entry.php | 5 +- tests/Generator/Schema/Patch.php | 3 +- tests/Generator/Schema/Update.php | 3 +- .../Server/resource/php/src/Model/Entry.php | 6 - .../resource/php/src/Model/EntryCreate.php | 8 - .../resource/php/src/Model/EntryDelete.php | 8 - .../resource/php/src/Model/EntryPatch.php | 8 - .../resource/php/src/Model/EntryUpdate.php | 8 - .../resource/php_complex/src/Model/Entry.php | 6 - .../php_complex/src/Model/EntryCreate.php | 8 - .../src/controller/app.controller.ts | 2 +- .../resource/typescript/src/dto/Entry.ts | 2 +- .../typescript/src/dto/EntryCollection.ts | 2 +- .../typescript/src/dto/EntryCreate.ts | 6 +- .../typescript/src/dto/EntryDelete.ts | 4 +- .../typescript/src/dto/EntryMessage.ts | 2 +- .../resource/typescript/src/dto/EntryPatch.ts | 4 +- .../typescript/src/dto/EntryUpdate.ts | 4 +- .../typescript_complex/src/dto/Entry.ts | 2 +- .../src/dto/EntryCollection.ts | 2 +- .../typescript_complex/src/dto/EntryCreate.ts | 6 +- .../src/dto/EntryMessage.ts | 2 +- tests/Generator/Spec/OpenAPITest.php | 14 +- tests/Generator/Spec/TypeAPITest.php | 10 - tests/Generator/Spec/resource/openapi.json | 78 +++----- .../Spec/resource/openapi_collection.json | 64 ++++-- tests/Generator/Spec/resource/typeapi.json | 172 ++++++++-------- .../Spec/resource/typeapi_collection.json | 70 +++---- tests/Inspector/ChangelogGeneratorTest.php | 8 +- tests/Parser/Attribute/TestController.php | 8 +- tests/Parser/AttributeTest.php | 9 +- tests/Parser/OpenAPITest.php | 19 +- tests/Parser/ParserTestCase.php | 33 ++-- 93 files changed, 562 insertions(+), 911 deletions(-) delete mode 100644 tests/Generator/Schema/Complex.php diff --git a/composer.json b/composer.json index 58597a32..51352322 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "require": { "php": ">=8.1", "psx/json": "^3.0", - "psx/openapi": "^0.1", + "psx/openapi": "^1.0", "psx/schema": "^7.0", "symfony/cache": "^5.0|^6.0|^7.0", "symfony/console": "^5.0|^6.0|^7.0", diff --git a/src/Attribute/ParamAbstract.php b/src/Attribute/ParamAbstract.php index 40065401..e050f23d 100644 --- a/src/Attribute/ParamAbstract.php +++ b/src/Attribute/ParamAbstract.php @@ -34,14 +34,7 @@ public function __construct( public string $name, public Type $type, public ?string $description = null, - public ?bool $required = null, - public ?array $enum = null, - public ?int $minLength = null, - public ?int $maxLength = null, - public ?string $pattern = null, public ?Format $format = null, - public ?int $minimum = null, - public ?int $maximum = null ) { } diff --git a/src/Builder/SpecificationBuilder.php b/src/Builder/SpecificationBuilder.php index 2157aa56..12c69e3e 100644 --- a/src/Builder/SpecificationBuilder.php +++ b/src/Builder/SpecificationBuilder.php @@ -26,6 +26,8 @@ use PSX\Api\SpecificationInterface; use PSX\Schema\ContentType; use PSX\Schema\DefinitionsInterface; +use PSX\Schema\Type\DefinitionTypeAbstract; +use PSX\Schema\Type\PropertyTypeAbstract; use PSX\Schema\TypeInterface; /** @@ -54,7 +56,7 @@ public function setSecurity(SecurityInterface $security): void $this->specification->setSecurity($security); } - public function addOperation(string $operationId, string $method, string $path, int $statusCode, TypeInterface|ContentType $schema): OperationBuilderInterface + public function addOperation(string $operationId, string $method, string $path, int $statusCode, PropertyTypeAbstract|ContentType $schema): OperationBuilderInterface { if ($this->specification->getOperations()->has($operationId)) { throw new OperationAlreadyExistsException('Operation "' . $operationId . '" already exists'); @@ -71,7 +73,7 @@ public function addDefinitions(DefinitionsInterface $definitions): self return $this; } - public function addType(string $name, TypeInterface $schema): self + public function addType(string $name, DefinitionTypeAbstract $schema): self { $this->specification->getDefinitions()->addType($name, $schema); return $this; diff --git a/src/Builder/SpecificationBuilderInterface.php b/src/Builder/SpecificationBuilderInterface.php index 261d096b..d9780505 100644 --- a/src/Builder/SpecificationBuilderInterface.php +++ b/src/Builder/SpecificationBuilderInterface.php @@ -24,7 +24,8 @@ use PSX\Api\SpecificationInterface; use PSX\Schema\ContentType; use PSX\Schema\DefinitionsInterface; -use PSX\Schema\TypeInterface; +use PSX\Schema\Type\DefinitionTypeAbstract; +use PSX\Schema\Type\PropertyTypeAbstract; /** * SpecificationBuilderInterface @@ -39,11 +40,11 @@ public function setBaseUrl(string $baseUrl): void; public function setSecurity(SecurityInterface $security): void; - public function addOperation(string $operationId, string $method, string $path, int $statusCode, TypeInterface|ContentType $schema): OperationBuilderInterface; + public function addOperation(string $operationId, string $method, string $path, int $statusCode, PropertyTypeAbstract|ContentType $schema): OperationBuilderInterface; public function addDefinitions(DefinitionsInterface $definitions): self; - public function addType(string $name, TypeInterface $schema): self; + public function addType(string $name, DefinitionTypeAbstract $schema): self; public function getSpecification(): SpecificationInterface; } diff --git a/src/Generator/Client/LanguageAbstract.php b/src/Generator/Client/LanguageAbstract.php index e924a5f2..29594d0f 100644 --- a/src/Generator/Client/LanguageAbstract.php +++ b/src/Generator/Client/LanguageAbstract.php @@ -151,8 +151,7 @@ public function generate(SpecificationInterface $specification): Generator\Code\ protected function generateSchema(DefinitionsInterface $definitions, Generator\Code\Chunks $chunks): void { - $schema = new Schema(TypeFactory::getAny(), $definitions); - $result = $this->generator->generate($schema); + $result = $this->generator->generate(new Schema($definitions, null)); if ($result instanceof Generator\Code\Chunks) { foreach ($result->getChunks() as $identifier => $code) { diff --git a/src/Generator/Client/LanguageBuilder.php b/src/Generator/Client/LanguageBuilder.php index 9f6ffec5..1fa85dbc 100644 --- a/src/Generator/Client/LanguageBuilder.php +++ b/src/Generator/Client/LanguageBuilder.php @@ -38,9 +38,13 @@ use PSX\Schema\Generator\TypeAwareInterface; use PSX\Schema\GeneratorInterface; use PSX\Schema\Type\AnyType; +use PSX\Schema\Type\ArrayPropertyType; use PSX\Schema\Type\ArrayType; use PSX\Schema\Type\IntersectionType; +use PSX\Schema\Type\MapPropertyType; use PSX\Schema\Type\MapType; +use PSX\Schema\Type\PropertyTypeAbstract; +use PSX\Schema\Type\ReferencePropertyType; use PSX\Schema\Type\ReferenceType; use PSX\Schema\Type\StructType; use PSX\Schema\Type\UnionType; @@ -164,7 +168,7 @@ private function getOperations(array $operations, DefinitionsInterface $definiti } elseif ($argument->getIn() === ArgumentInterface::IN_QUERY) { $query[$normalized] = new Dto\Argument($argument->getIn(), $this->newType($argument->getSchema(), true, $definitions, Type\GeneratorInterface::CONTEXT_CLIENT | Type\GeneratorInterface::CONTEXT_REQUEST)); $queryNames[$normalized] = $realName; - if ($argument->getSchema() instanceof ReferenceType) { + if ($argument->getSchema() instanceof ReferencePropertyType) { $queryStructNames[] = $realName; } } elseif ($argument->getIn() === ArgumentInterface::IN_BODY) { @@ -259,14 +263,14 @@ private function getOperations(array $operations, DefinitionsInterface $definiti return $result; } - private function getInnerSchema(TypeInterface $type, DefinitionsInterface $definitions): ?Dto\Type + private function getInnerSchema(PropertyTypeAbstract $type, DefinitionsInterface $definitions): ?Dto\Type { - if ($type instanceof MapType) { - $return = $this->newType($type->getAdditionalProperties(), false, $definitions, Type\GeneratorInterface::CONTEXT_CLIENT | Type\GeneratorInterface::CONTEXT_RESPONSE); + if ($type instanceof MapPropertyType) { + $return = $this->newType($type->getSchema(), false, $definitions, Type\GeneratorInterface::CONTEXT_CLIENT | Type\GeneratorInterface::CONTEXT_RESPONSE); $return->isMap = true; return $return; - } elseif ($type instanceof ArrayType) { - $return = $this->newType($type->getItems(), false, $definitions, Type\GeneratorInterface::CONTEXT_CLIENT | Type\GeneratorInterface::CONTEXT_RESPONSE); + } elseif ($type instanceof ArrayPropertyType) { + $return = $this->newType($type->getSchema(), false, $definitions, Type\GeneratorInterface::CONTEXT_CLIENT | Type\GeneratorInterface::CONTEXT_RESPONSE); $return->isArray = true; return $return; } else { @@ -274,25 +278,8 @@ private function getInnerSchema(TypeInterface $type, DefinitionsInterface $defin } } - /** - * @throws InvalidTypeException - * @throws TypeNotFoundException - */ - private function newType(TypeInterface|ContentType $type, bool $optional, DefinitionsInterface $definitions, int $context): Dto\Type + private function newType(PropertyTypeAbstract|ContentType $type, bool $optional, DefinitionsInterface $definitions, int $context): Dto\Type { - if ($type instanceof ReferenceType) { - // in case we have a reference type we take a look at the reference, normally this is a struct type but in - // some special cases we need to extract the type - $refType = $definitions->getType($type->getRef()); - if ($refType instanceof ReferenceType) { - $refType = $definitions->getType($refType->getRef()); - } - - if (!$refType instanceof StructType && !$refType instanceof MapType && !$refType instanceof AnyType) { - throw new InvalidTypeException('A reference can only point to a struct or map type, got: ' . get_class($refType) . ' for reference: ' . $type->getRef()); - } - } - if ($type instanceof ContentType) { $dataType = $this->typeGenerator->getContentType($type, $context); $docType = $dataType; @@ -311,27 +298,19 @@ private function newType(TypeInterface|ContentType $type, bool $optional, Defini /** * @throws GeneratorException */ - private function resolveImport(TypeInterface $type, array &$imports): void + private function resolveImport(PropertyTypeAbstract $type, array &$imports): void { - if ($type instanceof ReferenceType) { - $this->buildImport($type->getRef(), $imports); + if ($type instanceof ReferencePropertyType) { + $this->buildImport($type->getTarget(), $imports); if ($type->getTemplate()) { foreach ($type->getTemplate() as $typeRef) { $this->buildImport($typeRef, $imports); } } - } elseif ($type instanceof MapType && $type->getAdditionalProperties() instanceof TypeInterface) { - $this->resolveImport($type->getAdditionalProperties(), $imports); - } elseif ($type instanceof ArrayType && $type->getItems() instanceof TypeInterface) { - $this->resolveImport($type->getItems(), $imports); - } elseif ($type instanceof UnionType && $type->getOneOf()) { - foreach ($type->getOneOf() as $item) { - $this->resolveImport($item, $imports); - } - } elseif ($type instanceof IntersectionType) { - foreach ($type->getAllOf() as $item) { - $this->resolveImport($item, $imports); - } + } elseif ($type instanceof MapPropertyType && $type->getSchema() instanceof PropertyTypeAbstract) { + $this->resolveImport($type->getSchema(), $imports); + } elseif ($type instanceof ArrayPropertyType && $type->getSchema() instanceof PropertyTypeAbstract) { + $this->resolveImport($type->getSchema(), $imports); } } diff --git a/src/Generator/Client/Util/Naming.php b/src/Generator/Client/Util/Naming.php index 52426b88..ab815660 100644 --- a/src/Generator/Client/Util/Naming.php +++ b/src/Generator/Client/Util/Naming.php @@ -23,8 +23,12 @@ use PSX\Api\Exception\InvalidTypeException; use PSX\Schema\ContentType; use PSX\Schema\Generator\Normalizer\NormalizerInterface; +use PSX\Schema\Type\ArrayPropertyType; use PSX\Schema\Type\ArrayType; +use PSX\Schema\Type\MapPropertyType; use PSX\Schema\Type\MapType; +use PSX\Schema\Type\PropertyTypeAbstract; +use PSX\Schema\Type\ReferencePropertyType; use PSX\Schema\Type\ReferenceType; use PSX\Schema\Type\StringType; use PSX\Schema\TypeInterface; @@ -55,7 +59,10 @@ public function buildMethodNameByTag(string $tagName): string return $this->normalizer->method($tagName); } - public function buildExceptionClassNameByType(TypeInterface|ContentType $type): string + /** + * @throws InvalidTypeException + */ + public function buildExceptionClassNameByType(PropertyTypeAbstract|ContentType $type): string { if ($type instanceof ContentType) { return match ($type->getShape()) { @@ -66,12 +73,12 @@ public function buildExceptionClassNameByType(TypeInterface|ContentType $type): ContentType::TEXT => 'TextException', ContentType::XML => 'XmlException', }; - } elseif ($type instanceof ReferenceType) { - return $this->normalizer->class($type->getRef(), 'Exception'); - } elseif ($type instanceof MapType) { - return 'Map' . $this->buildExceptionClassNameByType($type->getAdditionalProperties()); - } elseif ($type instanceof ArrayType) { - return 'Array' . $this->buildExceptionClassNameByType($type->getItems()); + } elseif ($type instanceof ReferencePropertyType) { + return $this->normalizer->class($type->getTarget(), 'Exception'); + } elseif ($type instanceof MapPropertyType) { + return 'Map' . $this->buildExceptionClassNameByType($type->getSchema()); + } elseif ($type instanceof ArrayPropertyType) { + return 'Array' . $this->buildExceptionClassNameByType($type->getSchema()); } else { throw new InvalidTypeException('Provided an invalid type must be reference, map or array type'); } diff --git a/src/Generator/Markup/MarkupAbstract.php b/src/Generator/Markup/MarkupAbstract.php index a81ac606..f60cc5c1 100644 --- a/src/Generator/Markup/MarkupAbstract.php +++ b/src/Generator/Markup/MarkupAbstract.php @@ -93,7 +93,7 @@ protected function startLines(Dto\Client $client): array protected function generateSchema(DefinitionsInterface $definitions): string { - $schema = new Schema(TypeFactory::getAny(), $definitions); + $schema = new Schema($definitions, null); $return = $this->generator->generate($schema); return $return; diff --git a/src/Generator/Server/PHP.php b/src/Generator/Server/PHP.php index edc11a1a..b960d31e 100644 --- a/src/Generator/Server/PHP.php +++ b/src/Generator/Server/PHP.php @@ -25,6 +25,8 @@ use PSX\Schema\ContentType; use PSX\Schema\Generator; use PSX\Schema\GeneratorInterface as SchemaGeneratorInterface; +use PSX\Schema\Type\PropertyTypeAbstract; +use PSX\Schema\Type\ReferencePropertyType; use PSX\Schema\Type\ReferenceType; use PSX\Schema\TypeInterface; @@ -119,9 +121,9 @@ protected function generateFooter(File $file): string return $controller; } - protected function generateArgumentPath(string $rawName, string $variableName, string $type, TypeInterface|ContentType $argumentType): string + protected function generateArgumentPath(string $rawName, string $variableName, string $type, PropertyTypeAbstract|ContentType $argumentType): string { - if ($argumentType instanceof ReferenceType) { + if ($argumentType instanceof ReferencePropertyType) { $type = 'Model\\' . $type; } @@ -132,9 +134,9 @@ protected function generateArgumentPath(string $rawName, string $variableName, s } } - protected function generateArgumentQuery(string $rawName, string $variableName, string $type, TypeInterface|ContentType $argumentType): string + protected function generateArgumentQuery(string $rawName, string $variableName, string $type, PropertyTypeAbstract|ContentType $argumentType): string { - if ($argumentType instanceof ReferenceType) { + if ($argumentType instanceof ReferencePropertyType) { $type = 'Model\\' . $type; } @@ -145,9 +147,9 @@ protected function generateArgumentQuery(string $rawName, string $variableName, } } - protected function generateArgumentHeader(string $rawName, string $variableName, string $type, TypeInterface|ContentType $argumentType): string + protected function generateArgumentHeader(string $rawName, string $variableName, string $type, PropertyTypeAbstract|ContentType $argumentType): string { - if ($argumentType instanceof ReferenceType) { + if ($argumentType instanceof ReferencePropertyType) { $type = 'Model\\' . $type; } @@ -158,18 +160,18 @@ protected function generateArgumentHeader(string $rawName, string $variableName, } } - protected function generateArgumentBody(string $variableName, string $type, TypeInterface|ContentType $argumentType): string + protected function generateArgumentBody(string $variableName, string $type, PropertyTypeAbstract|ContentType $argumentType): string { - if ($argumentType instanceof ReferenceType) { + if ($argumentType instanceof ReferencePropertyType) { $type = 'Model\\' . $type; } return '#[Body] ' . $type . ' $' . $variableName; } - protected function generateMethod(string $operationName, OperationInterface $operation, array $arguments, string $type, TypeInterface|ContentType $returnType): string + protected function generateMethod(string $operationName, OperationInterface $operation, array $arguments, string $type, PropertyTypeAbstract|ContentType $returnType): string { - if ($returnType instanceof ReferenceType) { + if ($returnType instanceof ReferencePropertyType) { $type = 'Model\\' . $type; } diff --git a/src/Generator/Server/ServerAbstract.php b/src/Generator/Server/ServerAbstract.php index 47b14436..89d7e728 100644 --- a/src/Generator/Server/ServerAbstract.php +++ b/src/Generator/Server/ServerAbstract.php @@ -41,14 +41,15 @@ use PSX\Schema\Generator\TypeAwareInterface; use PSX\Schema\GeneratorInterface as SchemaGeneratorInterface; use PSX\Schema\Schema; -use PSX\Schema\Type\AnyType; +use PSX\Schema\Type\ArrayPropertyType; use PSX\Schema\Type\ArrayType; use PSX\Schema\Type\IntersectionType; +use PSX\Schema\Type\MapPropertyType; use PSX\Schema\Type\MapType; +use PSX\Schema\Type\PropertyTypeAbstract; +use PSX\Schema\Type\ReferencePropertyType; use PSX\Schema\Type\ReferenceType; -use PSX\Schema\Type\StructType; use PSX\Schema\Type\UnionType; -use PSX\Schema\TypeFactory; use PSX\Schema\TypeInterface; use Twig\Environment; use Twig\Loader\FilesystemLoader; @@ -150,15 +151,15 @@ abstract protected function getFileExtension(): string; abstract protected function generateHeader(File $file, array $imports): string; abstract protected function generateFooter(File $file): string; - abstract protected function generateArgumentPath(string $rawName, string $variableName, string $type, TypeInterface|ContentType $argumentType): string; - abstract protected function generateArgumentQuery(string $rawName, string $variableName, string $type, TypeInterface|ContentType $argumentType): string; - abstract protected function generateArgumentHeader(string $rawName, string $variableName, string $type, TypeInterface|ContentType $argumentType): string; - abstract protected function generateArgumentBody(string $variableName, string $type, TypeInterface|ContentType $argumentType): string; + abstract protected function generateArgumentPath(string $rawName, string $variableName, string $type, PropertyTypeAbstract|ContentType $argumentType): string; + abstract protected function generateArgumentQuery(string $rawName, string $variableName, string $type, PropertyTypeAbstract|ContentType $argumentType): string; + abstract protected function generateArgumentHeader(string $rawName, string $variableName, string $type, PropertyTypeAbstract|ContentType $argumentType): string; + abstract protected function generateArgumentBody(string $variableName, string $type, PropertyTypeAbstract|ContentType $argumentType): string; /** * @param array $arguments */ - abstract protected function generateMethod(string $operationName, OperationInterface $operation, array $arguments, string $type, TypeInterface|ContentType $returnType): string; + abstract protected function generateMethod(string $operationName, OperationInterface $operation, array $arguments, string $type, PropertyTypeAbstract|ContentType $returnType): string; protected function buildControllerFileName(string $name): string { @@ -185,21 +186,8 @@ protected function buildFolderStructure(SpecificationInterface $specification): * @throws InvalidTypeException * @throws TypeNotFoundException */ - protected function newType(TypeInterface|ContentType $type, DefinitionsInterface $definitions, int $context): Dto\Type + protected function newType(PropertyTypeAbstract|ContentType $type, DefinitionsInterface $definitions, int $context): Dto\Type { - if ($type instanceof ReferenceType) { - // in case we have a reference type we take a look at the reference, normally this is a struct type but in - // some special cases we need to extract the type - $refType = $definitions->getType($type->getRef()); - if ($refType instanceof ReferenceType) { - $refType = $definitions->getType($refType->getRef()); - } - - if (!$refType instanceof StructType && !$refType instanceof MapType && !$refType instanceof AnyType) { - throw new InvalidTypeException('A reference can only point to a struct or map type, got: ' . get_class($refType) . ' for reference: ' . $type->getRef()); - } - } - if ($type instanceof ContentType) { $dataType = $this->typeGenerator->getContentType($type, $context); $docType = $dataType; @@ -216,8 +204,7 @@ protected function newType(TypeInterface|ContentType $type, DefinitionsInterface protected function generateSchema(DefinitionsInterface $definitions, Generator\Code\Chunks $chunks): void { - $schema = new Schema(TypeFactory::getAny(), $definitions); - $result = $this->generator->generate($schema); + $result = $this->generator->generate(new Schema($definitions, null)); if ($result instanceof Generator\Code\Chunks) { foreach ($result->getChunks() as $identifier => $code) { @@ -251,7 +238,7 @@ private function generateControllerFile(File $file, SpecificationInterface $spec $args[] = $this->generateArgumentBody($variableName, $type->type, $argumentType); } - if ($argumentType instanceof TypeInterface) { + if ($argumentType instanceof PropertyTypeAbstract) { $this->resolveImport($argumentType, $imports); } } @@ -259,7 +246,7 @@ private function generateControllerFile(File $file, SpecificationInterface $spec $returnType = $operation->getReturn()->getSchema(); $type = $this->newType($returnType, $specification->getDefinitions(), Type\GeneratorInterface::CONTEXT_SERVER | Type\GeneratorInterface::CONTEXT_RESPONSE); - if ($returnType instanceof TypeInterface) { + if ($returnType instanceof PropertyTypeAbstract) { $this->resolveImport($returnType, $imports); } @@ -273,27 +260,19 @@ private function generateControllerFile(File $file, SpecificationInterface $spec return $this->getFileContent($result, $file->getName()); } - private function resolveImport(TypeInterface $type, array &$imports): void + private function resolveImport(PropertyTypeAbstract $type, array &$imports): void { - if ($type instanceof ReferenceType) { - $imports[$this->normalizer->file($type->getRef())] = $this->normalizer->class($type->getRef()); + if ($type instanceof ReferencePropertyType) { + $imports[$this->normalizer->file($type->getTarget())] = $this->normalizer->class($type->getTarget()); if ($type->getTemplate()) { foreach ($type->getTemplate() as $typeRef) { $imports[$this->normalizer->file($typeRef)] = $this->normalizer->class($typeRef); } } - } elseif ($type instanceof MapType && $type->getAdditionalProperties() instanceof TypeInterface) { - $this->resolveImport($type->getAdditionalProperties(), $imports); - } elseif ($type instanceof ArrayType && $type->getItems() instanceof TypeInterface) { - $this->resolveImport($type->getItems(), $imports); - } elseif ($type instanceof UnionType && $type->getOneOf()) { - foreach ($type->getOneOf() as $item) { - $this->resolveImport($item, $imports); - } - } elseif ($type instanceof IntersectionType) { - foreach ($type->getAllOf() as $item) { - $this->resolveImport($item, $imports); - } + } elseif ($type instanceof MapPropertyType && $type->getSchema() instanceof PropertyTypeAbstract) { + $this->resolveImport($type->getSchema(), $imports); + } elseif ($type instanceof ArrayPropertyType && $type->getSchema() instanceof PropertyTypeAbstract) { + $this->resolveImport($type->getSchema(), $imports); } } diff --git a/src/Generator/Spec/OpenAPI.php b/src/Generator/Spec/OpenAPI.php index f78180c2..802137a7 100644 --- a/src/Generator/Spec/OpenAPI.php +++ b/src/Generator/Spec/OpenAPI.php @@ -51,11 +51,16 @@ use PSX\OpenAPI\SecuritySchemes; use PSX\OpenAPI\Server; use PSX\OpenAPI\Tag; +use PSX\Schema\Definitions; use PSX\Schema\DefinitionsInterface; use PSX\Schema\Generator; use PSX\Schema\Parser\Popo\Dumper; use PSX\Schema\Type\ArrayType; +use PSX\Schema\Type\ArrayTypeInterface; use PSX\Schema\Type\MapType; +use PSX\Schema\Type\MapTypeInterface; +use PSX\Schema\Type\PropertyTypeAbstract; +use PSX\Schema\Type\ReferencePropertyType; use PSX\Schema\Type\ReferenceType; use PSX\Schema\TypeFactory; use PSX\Schema\TypeInterface; @@ -128,7 +133,7 @@ protected function buildDeclaration(Paths $paths, DefinitionsInterface $definiti $server = new Server(); $server->setUrl($baseUrl); - $result = $this->generator->toArray(TypeFactory::getAny(), $definitions); + $result = $this->generator->toArray($definitions, null); $schemas = new Schemas(); foreach ($result['definitions'] as $name => $schema) { @@ -231,17 +236,12 @@ protected function buildPathItem(array $operations, DefinitionsInterface $defini return $pathItem; } - protected function newParameter(TypeInterface $type, bool $required, DefinitionsInterface $definitions): Parameter + protected function newParameter(PropertyTypeAbstract $type, bool $required, DefinitionsInterface $definitions): Parameter { - $schema = $this->generator->toArray($type, $definitions); - if (isset($schema['definitions'])) { - unset($schema['definitions']); - } - $param = new Parameter(); $param->setDescription($type->getDescription()); $param->setRequired($required); - $param->setSchema($schema); + $param->setSchema($this->generator->toProperty($type, $definitions)); return $param; } @@ -268,22 +268,22 @@ private function getMediaTypes(TypeInterface $type, DefinitionsInterface $defini private function resolveSchema(TypeInterface $type, DefinitionsInterface $definitions): \stdClass { - if ($type instanceof ReferenceType) { + if ($type instanceof ReferencePropertyType) { return (object) [ - '$ref' => '#/components/schemas/' . $type->getRef(), + '$ref' => '#/components/schemas/' . $type->getTarget(), ]; - } elseif ($type instanceof MapType) { + } elseif ($type instanceof MapTypeInterface) { return (object) [ 'type' => 'object', - 'additionalProperties' => $this->resolveSchema($type->getAdditionalProperties(), $definitions), + 'additionalProperties' => $this->resolveSchema($type->getSchema(), $definitions), ]; - } elseif ($type instanceof ArrayType) { + } elseif ($type instanceof ArrayTypeInterface) { return (object) [ 'type' => 'array', - 'items' => $this->resolveSchema($type->getItems(), $definitions), + 'items' => $this->resolveSchema($type->getSchema(), $definitions), ]; } else { - return (object) $this->generator->toArray($type, $definitions); + return (object) $this->generator->toArray($definitions, null); } } diff --git a/src/Generator/Spec/TypeAPI.php b/src/Generator/Spec/TypeAPI.php index c2ccbce4..c86e7b8a 100644 --- a/src/Generator/Spec/TypeAPI.php +++ b/src/Generator/Spec/TypeAPI.php @@ -73,7 +73,7 @@ public function generate(SpecificationInterface $specification): Generator\Code\ private function generateDefinitions(DefinitionsInterface $definitions): ?array { $generator = new Generator\TypeSchema(); - $schema = $generator->toArray(TypeFactory::getAny(), $definitions); + $schema = $generator->toArray($definitions, null); return $schema['definitions'] ?? null; } diff --git a/src/Inspector/ChangelogGenerator.php b/src/Inspector/ChangelogGenerator.php index b32a002d..8a084ef5 100644 --- a/src/Inspector/ChangelogGenerator.php +++ b/src/Inspector/ChangelogGenerator.php @@ -26,8 +26,10 @@ use PSX\Api\OperationsInterface; use PSX\Api\SecurityInterface; use PSX\Api\SpecificationInterface; +use PSX\Schema\ContentType; use PSX\Schema\Inspector\ChangelogGenerator as SchemaChangelogGenerator; use PSX\Schema\Inspector\SemVer; +use PSX\Schema\Type\PropertyTypeAbstract; /** * ChangelogGenerator @@ -179,7 +181,7 @@ private function generateArgument(Operation\Argument $left, Operation\Argument $ yield SemVer::PATCH => $this->getMessageChanged(array_merge($path, ['in']), $left->getIn(), $right->getIn()); } - yield from $this->changelogGenerator->generateType($left->getSchema(), $right->getSchema(), implode('.', $path)); + yield from $this->generateSchema($left->getSchema(), $right->getSchema(), $path); } private function generateResponse(Operation\Response $left, Operation\Response $right, array $path): \Generator @@ -188,7 +190,22 @@ private function generateResponse(Operation\Response $left, Operation\Response $ yield SemVer::PATCH => $this->getMessageChanged(array_merge($path, ['code']), $left->getCode(), $right->getCode()); } - yield from $this->changelogGenerator->generateType($left->getSchema(), $right->getSchema(), implode('.', $path)); + yield from $this->generateSchema($left->getSchema(), $right->getSchema(), $path); + } + + private function generateSchema(ContentType|PropertyTypeAbstract $leftSchema, ContentType|PropertyTypeAbstract $rightSchema, array $path): \Generator + { + if ($leftSchema instanceof ContentType && $rightSchema instanceof ContentType) { + if ($leftSchema->toString() !== $rightSchema->toString()) { + yield SemVer::MAJOR => $this->getMessageChanged(array_merge($path, ['contentType']), $leftSchema->toString(), $rightSchema->toString()); + } + } elseif ($leftSchema instanceof ContentType && $rightSchema instanceof PropertyTypeAbstract) { + yield SemVer::MAJOR => $this->getMessageChanged(array_merge($path, ['contentType']), $leftSchema->toString(), 'schema'); + } elseif ($leftSchema instanceof PropertyTypeAbstract && $rightSchema instanceof ContentType) { + yield SemVer::MAJOR => $this->getMessageChanged(array_merge($path, ['contentType']), 'schema', $rightSchema->toString()); + } else { + yield from $this->changelogGenerator->generatePropertyType($leftSchema, $rightSchema, implode('.', $path)); + } } private function getMessageAdded(array $path, string $type = 'Operation'): string diff --git a/src/Operation/Argument.php b/src/Operation/Argument.php index de711ed5..7516c0b4 100644 --- a/src/Operation/Argument.php +++ b/src/Operation/Argument.php @@ -21,7 +21,7 @@ namespace PSX\Api\Operation; use PSX\Schema\ContentType; -use PSX\Schema\TypeInterface; +use PSX\Schema\Type\PropertyTypeAbstract; /** * Argument @@ -33,10 +33,10 @@ class Argument implements ArgumentInterface, \JsonSerializable { private string $in; - private TypeInterface|ContentType $schema; + private PropertyTypeAbstract|ContentType $schema; private ?string $name; - public function __construct(string $in, TypeInterface|ContentType $schema, ?string $name = null) + public function __construct(string $in, PropertyTypeAbstract|ContentType $schema, ?string $name = null) { if (!in_array($in, [self::IN_PATH, self::IN_HEADER, self::IN_QUERY, self::IN_BODY])) { throw new \InvalidArgumentException('Provided an invalid "in" value, must be one of: ' . implode(', ', [self::IN_PATH, self::IN_HEADER, self::IN_QUERY, self::IN_BODY])); @@ -52,7 +52,7 @@ public function getIn(): string return $this->in; } - public function getSchema(): TypeInterface|ContentType + public function getSchema(): PropertyTypeAbstract|ContentType { return $this->schema; } @@ -65,7 +65,7 @@ public function getName(): ?string public function jsonSerialize(): array { if ($this->schema instanceof ContentType) { - $contentType = $this->schema->value; + $contentType = $this->schema->toString(); $schema = null; } else { $contentType = null; diff --git a/src/Operation/ArgumentInterface.php b/src/Operation/ArgumentInterface.php index ccd3fd57..79ca0beb 100644 --- a/src/Operation/ArgumentInterface.php +++ b/src/Operation/ArgumentInterface.php @@ -21,7 +21,7 @@ namespace PSX\Api\Operation; use PSX\Schema\ContentType; -use PSX\Schema\TypeInterface; +use PSX\Schema\Type\PropertyTypeAbstract; /** * ArgumentInterface @@ -39,7 +39,7 @@ interface ArgumentInterface public function getIn(): string; - public function getSchema(): TypeInterface|ContentType; + public function getSchema(): PropertyTypeAbstract|ContentType; public function getName(): ?string; } diff --git a/src/Operation/Arguments.php b/src/Operation/Arguments.php index e5363793..c20668f6 100644 --- a/src/Operation/Arguments.php +++ b/src/Operation/Arguments.php @@ -42,10 +42,6 @@ public function __construct(array $arguments = []) public function add(string $name, Argument $argument): void { - if ($argument->getSchema() instanceof StructType) { - throw new InvalidArgumentException('It is not allowed to pass a struct type as argument, please add it to the definitions and pass a reference'); - } - $this->container[$name] = $argument; } diff --git a/src/Parser/Attribute.php b/src/Parser/Attribute.php index 41a677ae..94ba6c5d 100644 --- a/src/Parser/Attribute.php +++ b/src/Parser/Attribute.php @@ -33,26 +33,19 @@ use PSX\Api\Specification; use PSX\Api\SpecificationInterface; use PSX\Api\Util\Inflection; -use PSX\DateTime\Duration; use PSX\DateTime\LocalDate; use PSX\DateTime\LocalDateTime; use PSX\DateTime\LocalTime; -use PSX\DateTime\Period; use PSX\Schema\ContentType; use PSX\Schema\DefinitionsInterface; use PSX\Schema\Exception\InvalidSchemaException; use PSX\Schema\Format; use PSX\Schema\Parser\Context\FilesystemContext; use PSX\Schema\Parser\ContextInterface; +use PSX\Schema\Parser\Popo\ReflectionReader; use PSX\Schema\SchemaManagerInterface; use PSX\Schema\Type; -use PSX\Schema\Type\NumberType; -use PSX\Schema\Type\ScalarType; -use PSX\Schema\Type\StringType; -use PSX\Schema\Type\TypeAbstract; -use PSX\Schema\TypeFactory; use PSX\Schema\TypeInterface; -use PSX\Uri\Uri; use ReflectionClass; /** @@ -66,6 +59,7 @@ class Attribute implements ParserInterface { private SchemaManagerInterface $schemaManager; private BuilderInterface $builder; + private ReflectionReader $reader; private bool $inspectTypeHints; public function __construct(SchemaManagerInterface $schemaManager, BuilderInterface $builder, bool $inspectTypeHints = true) @@ -73,6 +67,7 @@ public function __construct(SchemaManagerInterface $schemaManager, BuilderInterf $this->schemaManager = $schemaManager; $this->builder = $builder; $this->inspectTypeHints = $inspectTypeHints; + $this->reader = new ReflectionReader(); } /** @@ -262,7 +257,7 @@ public function getResponsesInRange(Meta $meta, int $start, int $end): array /** * @throws InvalidSchemaException */ - private function getBodySchema(Attr\SchemaAbstract $annotation, DefinitionsInterface $definitions, string $basePath): TypeInterface|ContentType + private function getBodySchema(Attr\SchemaAbstract $annotation, DefinitionsInterface $definitions, string $basePath): Type\PropertyTypeAbstract|ContentType { if ($annotation->schema instanceof ContentType) { return $annotation->schema; @@ -272,65 +267,30 @@ private function getBodySchema(Attr\SchemaAbstract $annotation, DefinitionsInter $definitions->merge($schema->getDefinitions()); - return $schema->getType(); + return Type\Factory\PropertyTypeFactory::getReference($schema->getRoot()); } - /** - * @throws InvalidSchemaException - */ private function getParameter(Attr\ParamAbstract $param): TypeInterface { $type = match ($param->type) { - Type::INTEGER => TypeFactory::getInteger(), - Type::NUMBER => TypeFactory::getNumber(), - Type::BOOLEAN => TypeFactory::getBoolean(), - default => TypeFactory::getString(), + Type::INTEGER => Type\Factory\PropertyTypeFactory::getInteger(), + Type::NUMBER => Type\Factory\PropertyTypeFactory::getNumber(), + Type::BOOLEAN => Type\Factory\PropertyTypeFactory::getBoolean(), + default => Type\Factory\PropertyTypeFactory::getString(), }; - if ($type instanceof TypeAbstract) { + if ($type instanceof Type\PropertyTypeAbstract) { $description = $param->description; if ($description !== null) { $type->setDescription($description); } } - if ($type instanceof ScalarType) { - $enum = $param->enum; - if (is_array($enum)) { - $type->setEnum($enum); - } - } - - if ($type instanceof StringType) { - $minLength = $param->minLength; - if ($minLength !== null) { - $type->setMinLength($minLength); - } - - $maxLength = $param->maxLength; - if ($maxLength !== null) { - $type->setMaxLength($maxLength); - } - - $pattern = $param->pattern; - if ($pattern !== null) { - $type->setPattern($pattern); - } - + if ($type instanceof Type\StringPropertyType) { $format = $param->format; if ($format !== null) { $type->setFormat($format); } - } elseif ($type instanceof NumberType) { - $minimum = $param->minimum; - if ($minimum !== null) { - $type->setMinimum($minimum); - } - - $maximum = $param->maximum; - if ($maximum !== null) { - $type->setMaximum($maximum); - } } return $type; @@ -546,44 +506,16 @@ private function getParamArgsFromType(string $name, ?\ReflectionType $type, bool return null; } - $return = match ($type->getName()) { - 'string' => [$name, Type::STRING, '', $required, $enum], - 'int' => [$name, Type::INTEGER, '', $required, $enum], - 'float' => [$name, Type::NUMBER, '', $required, $enum], - 'bool' => [$name, Type::BOOLEAN, '', $required, $enum], - 'mixed' => [$name, Type::ANY, '', $required, $enum], - 'resource' => [$name, Type::STRING, '', $required, $enum, null, null, null, Format::BINARY], - LocalDateTime::class, \DateTimeInterface::class, \DateTimeImmutable::class, \DateTime::class => [$name, Type::STRING, '', $required, $enum, null, null, null, Format::DATETIME], - LocalDate::class => [$name, Type::STRING, '', $required, $enum, null, null, null, Format::DATE], - LocalTime::class => [$name, Type::STRING, '', $required, $enum, null, null, null, Format::TIME], - Period::class, \DateInterval::class => [$name, Type::STRING, '', $required, $enum, null, null, null, Format::PERIOD], - Duration::class => [$name, Type::STRING, '', $required, $enum, null, null, null, Format::DURATION], - Uri::class => [$name, Type::STRING, '', $required, $enum, null, null, null, Format::URI], + return match ($type->getName()) { + 'string' => [$name, Type::STRING, ''], + 'int' => [$name, Type::INTEGER, ''], + 'float' => [$name, Type::NUMBER, ''], + 'bool' => [$name, Type::BOOLEAN, ''], + 'mixed' => [$name, Type::ANY, ''], + LocalDate::class => [$name, Type::STRING, '', Format::DATE], + LocalDateTime::class, \DateTimeInterface::class, \DateTimeImmutable::class, \DateTime::class => [$name, Type::STRING, '', Format::DATETIME], + LocalTime::class => [$name, Type::STRING, '', Format::TIME], default => null, }; - - if ($return === null && function_exists('enum_exists') && enum_exists($type->getName())) { - $return = $this->getTypeFromEnum(new \ReflectionEnum($type->getName()), $name, $required); - } - - return $return; - } - - private function getTypeFromEnum(\ReflectionEnum $enum, string $name, bool $required): ?array - { - if (!$enum->isBacked()) { - // we handle only backed enums since we have only in this case a stable value - return null; - } - - $values = []; - $cases = $enum->getCases(); - foreach ($cases as $case) { - if ($case instanceof \ReflectionEnumBackedCase) { - $values[] = $case->getBackingValue(); - } - } - - return $this->getParamArgsFromType($name, $enum->getBackingType(), $required, $values); } } diff --git a/src/Parser/OpenAPI.php b/src/Parser/OpenAPI.php index f05f2973..02d69db4 100644 --- a/src/Parser/OpenAPI.php +++ b/src/Parser/OpenAPI.php @@ -61,9 +61,14 @@ use PSX\Schema\SchemaManagerInterface; use PSX\Schema\SchemaTraverser; use PSX\Schema\Type\ArrayType; +use PSX\Schema\Type\ArrayTypeInterface; +use PSX\Schema\Type\Factory\PropertyTypeFactory; use PSX\Schema\Type\IntersectionType; use PSX\Schema\Type\MapType; +use PSX\Schema\Type\MapTypeInterface; +use PSX\Schema\Type\ReferencePropertyType; use PSX\Schema\Type\ReferenceType; +use PSX\Schema\Type\StructDefinitionType; use PSX\Schema\Type\StructType; use PSX\Schema\Type\UnionType; use PSX\Schema\TypeFactory; @@ -299,7 +304,7 @@ private function parseParameter(string $in, Parameter|Reference $data): array } $name = $data->getName(); - $type = TypeFactory::getString(); + $type = PropertyTypeFactory::getString(); $required = null; if (!empty($name) && $data->getIn() == $in) { @@ -307,9 +312,9 @@ private function parseParameter(string $in, Parameter|Reference $data): array $schema = $data->getSchema(); if ($schema instanceof \stdClass) { - $type = $this->schemaParser->parseType($schema); - if ($type instanceof ReferenceType) { - $type = $this->definitions->getType($type->getRef()); + $type = $this->schemaParser->parsePropertyType($schema); + if ($type instanceof ReferencePropertyType) { + $type = $this->definitions->getType($type->getTarget()); } } } @@ -384,7 +389,7 @@ private function getSchemaFromMediaTypes(MediaTypes $mediaTypes): ?TypeInterface return null; } - $type = $this->schemaParser->parseType($schema); + $type = $this->schemaParser->parsePropertyType($schema); return $this->transformInlineStruct($type); } @@ -397,37 +402,25 @@ private function getSchemaFromMediaTypes(MediaTypes $mediaTypes): ?TypeInterface */ private function transformInlineStruct(TypeInterface $type): TypeInterface { - if ($type instanceof StructType) { + if ($type instanceof StructDefinitionType) { // we have an inline struct type we automatically add this ot the definitions, since we have no name we generate // it based on the type, this should motivate users to move the definition to the components section $typeName = 'Inline' . substr($this->hashInspector->generateByType($type), 0, 8); $this->definitions->addType($typeName, $type); return TypeFactory::getReference($typeName); - } elseif ($type instanceof MapType) { - $child = $type->getAdditionalProperties(); - if ($child instanceof TypeInterface) { - $r = $this->transformInlineStruct($child); + } elseif ($type instanceof MapTypeInterface) { + $schema = $type->getSchema(); + if ($schema instanceof TypeInterface) { + $r = $this->transformInlineStruct($schema); return TypeFactory::getMap($r); } - } elseif ($type instanceof ArrayType) { - $child = $type->getItems(); - if ($child instanceof TypeInterface) { - $r = $this->transformInlineStruct($child); + } elseif ($type instanceof ArrayTypeInterface) { + $schema = $type->getSchema(); + if ($schema instanceof TypeInterface) { + $r = $this->transformInlineStruct($schema); return TypeFactory::getArray($r); } - } elseif ($type instanceof UnionType) { - $result = []; - foreach ($type->getOneOf() as $child) { - $result[] = $this->transformInlineStruct($child); - } - return TypeFactory::getUnion($result); - } elseif ($type instanceof IntersectionType) { - $result = []; - foreach ($type->getAllOf() as $child) { - $result[] = $this->transformInlineStruct($child); - } - return TypeFactory::getIntersection($result); } return $type; diff --git a/src/Parser/TypeAPI.php b/src/Parser/TypeAPI.php index 22985e07..0232cb9e 100644 --- a/src/Parser/TypeAPI.php +++ b/src/Parser/TypeAPI.php @@ -224,7 +224,7 @@ private function parseArgument(\stdClass $data): Operation\Argument throw new ParserException('Property "schema" must be an object'); } - $type = $this->schemaParser->parseType($schema); + $type = $this->schemaParser->parsePropertyType($schema); } $name = $data->name ?? null; @@ -271,7 +271,7 @@ private function parseResponse(\stdClass $data): Operation\Response throw new ParserException('Property "schema" must be an object'); } - $type = $this->schemaParser->parseType($schema); + $type = $this->schemaParser->parsePropertyType($schema); } return new Operation\Response($code, $type); diff --git a/tests/ApiManagerTest.php b/tests/ApiManagerTest.php index b7381097..ed64c1bc 100644 --- a/tests/ApiManagerTest.php +++ b/tests/ApiManagerTest.php @@ -24,6 +24,7 @@ use PSX\Api\SpecificationInterface; use PSX\Api\Tests\Parser\Attribute\TestController; use PSX\Schema\SchemaManager; +use PSX\Schema\Type\Factory\PropertyTypeFactory; /** * ApiManagerTest @@ -70,8 +71,8 @@ public function testGetBuilder() $schema = $manager->getSchema(__DIR__ . '/Parser/schema/schema.json'); $builder->addDefinitions($schema->getDefinitions()); - $operation = $builder->addOperation('my.operation', 'GET', '/foo', 200, $schema->getType()); - $operation->addArgument('payload', 'body', $schema->getType()); + $operation = $builder->addOperation('my.operation', 'GET', '/foo', 200, PropertyTypeFactory::getReference($schema->getRoot())); + $operation->addArgument('payload', 'body', PropertyTypeFactory::getReference($schema->getRoot())); $operation->setDescription('My operation description'); $operation->setSecurity(['foo']); $operation->setTags(['my_tag']); diff --git a/tests/Console/GenerateCommandTest.php b/tests/Console/GenerateCommandTest.php index bceb8dd9..277b8e58 100644 --- a/tests/Console/GenerateCommandTest.php +++ b/tests/Console/GenerateCommandTest.php @@ -46,11 +46,11 @@ public function testGenerateClientPhp() $command = $this->getGenerateCommand(); $commandTester = new CommandTester($command); - $commandTester->execute(array( + $commandTester->execute([ 'type' => LocalRepository::CLIENT_PHP, 'dir' => __DIR__ . '/output', '--config' => 'Acme\\Sdk\\Generated', - )); + ]); $this->assertFileExists(__DIR__ . '/output/sdk-client-php.zip'); } @@ -60,10 +60,10 @@ public function testGenerateSpecOpenAPI() $command = $this->getGenerateCommand(); $commandTester = new CommandTester($command); - $commandTester->execute(array( + $commandTester->execute([ 'type' => LocalRepository::SPEC_OPENAPI, 'dir' => __DIR__ . '/output', - )); + ]); $this->assertFileExists(__DIR__ . '/output/output-spec-openapi.json'); } diff --git a/tests/Console/resource/spec_openapi.json b/tests/Console/resource/spec_openapi.json index 55827634..ee56c318 100644 --- a/tests/Console/resource/spec_openapi.json +++ b/tests/Console/resource/spec_openapi.json @@ -41,10 +41,6 @@ "in": "query", "required": false, "schema": { - "enum": [ - "foo", - "bar" - ], "type": "string" } }, @@ -53,8 +49,7 @@ "in": "query", "required": false, "schema": { - "type": "string", - "pattern": "[A-z]+" + "type": "string" } }, { @@ -78,8 +73,8 @@ "in": "query", "required": false, "schema": { - "format": "date-time", - "type": "string" + "type": "string", + "format": "date-time" } }, { @@ -157,7 +152,6 @@ } }, "Rating": { - "title": "Rating", "type": "object", "properties": { "author": { @@ -190,11 +184,7 @@ "$ref": "#/components/schemas/Rating" } } - }, - "required": [ - "title", - "artist" - ] + } } } } diff --git a/tests/Generator/Client/PHPTest.php b/tests/Generator/Client/PHPTest.php index 8319a6a3..4d33244f 100644 --- a/tests/Generator/Client/PHPTest.php +++ b/tests/Generator/Client/PHPTest.php @@ -59,14 +59,6 @@ public function testGenerateCollection() $this->assertFileExists($target . '/Client.php'); } - public function testGenerateComplex() - { - $this->expectException(InvalidTypeException::class); - - $generator = new PHP('http://api.foo.com', Config::of('Foo\\Bar')); - $generator->generate($this->getSpecificationComplex()); - } - public function testGenerateTest() { $generator = new PHP('http://127.0.0.1:8081', Config::of('Sdkgen\\Client\\Tests\\Generated')); diff --git a/tests/Generator/Client/TypeScriptTest.php b/tests/Generator/Client/TypeScriptTest.php index d2c2c5bb..41f34f4b 100644 --- a/tests/Generator/Client/TypeScriptTest.php +++ b/tests/Generator/Client/TypeScriptTest.php @@ -59,14 +59,6 @@ public function testGenerateCollection() $this->assertFileExists($target . '/Client.ts'); } - public function testGenerateComplex() - { - $this->expectException(InvalidTypeException::class); - - $generator = new TypeScript('http://api.foo.com'); - $generator->generate($this->getSpecificationComplex()); - } - public function testGenerateTest() { $generator = new TypeScript('http://127.0.0.1:8081'); diff --git a/tests/Generator/Client/resource/php/Entry.php b/tests/Generator/Client/resource/php/Entry.php index 96af2897..fb2ddff9 100644 --- a/tests/Generator/Client/resource/php/Entry.php +++ b/tests/Generator/Client/resource/php/Entry.php @@ -4,17 +4,10 @@ * @see https://sdkgen.app */ -use PSX\Schema\Attribute\MaxLength; -use PSX\Schema\Attribute\MinLength; -use PSX\Schema\Attribute\Pattern; - class Entry implements \JsonSerializable, \PSX\Record\RecordableInterface { protected ?int $id = null; protected ?int $userId = null; - #[Pattern('[A-z]+')] - #[MinLength(3)] - #[MaxLength(16)] protected ?string $title = null; protected ?\PSX\DateTime\LocalDateTime $date = null; public function setId(?int $id) : void diff --git a/tests/Generator/Client/resource/php/EntryCreate.php b/tests/Generator/Client/resource/php/EntryCreate.php index c42b855f..43abb953 100644 --- a/tests/Generator/Client/resource/php/EntryCreate.php +++ b/tests/Generator/Client/resource/php/EntryCreate.php @@ -4,19 +4,10 @@ * @see https://sdkgen.app */ -use PSX\Schema\Attribute\MaxLength; -use PSX\Schema\Attribute\MinLength; -use PSX\Schema\Attribute\Pattern; -use PSX\Schema\Attribute\Required; - -#[Required(array('title', 'date'))] class EntryCreate implements \JsonSerializable, \PSX\Record\RecordableInterface { protected ?int $id = null; protected ?int $userId = null; - #[Pattern('[A-z]+')] - #[MinLength(3)] - #[MaxLength(16)] protected ?string $title = null; protected ?\PSX\DateTime\LocalDateTime $date = null; public function setId(?int $id) : void diff --git a/tests/Generator/Client/resource/php/EntryDelete.php b/tests/Generator/Client/resource/php/EntryDelete.php index 14cdf7c6..4d8487cb 100644 --- a/tests/Generator/Client/resource/php/EntryDelete.php +++ b/tests/Generator/Client/resource/php/EntryDelete.php @@ -4,19 +4,10 @@ * @see https://sdkgen.app */ -use PSX\Schema\Attribute\MaxLength; -use PSX\Schema\Attribute\MinLength; -use PSX\Schema\Attribute\Pattern; -use PSX\Schema\Attribute\Required; - -#[Required(array('id'))] class EntryDelete implements \JsonSerializable, \PSX\Record\RecordableInterface { protected ?int $id = null; protected ?int $userId = null; - #[Pattern('[A-z]+')] - #[MinLength(3)] - #[MaxLength(16)] protected ?string $title = null; protected ?\PSX\DateTime\LocalDateTime $date = null; public function setId(?int $id) : void diff --git a/tests/Generator/Client/resource/php/EntryPatch.php b/tests/Generator/Client/resource/php/EntryPatch.php index b6060483..340209c4 100644 --- a/tests/Generator/Client/resource/php/EntryPatch.php +++ b/tests/Generator/Client/resource/php/EntryPatch.php @@ -4,19 +4,10 @@ * @see https://sdkgen.app */ -use PSX\Schema\Attribute\MaxLength; -use PSX\Schema\Attribute\MinLength; -use PSX\Schema\Attribute\Pattern; -use PSX\Schema\Attribute\Required; - -#[Required(array('id'))] class EntryPatch implements \JsonSerializable, \PSX\Record\RecordableInterface { protected ?int $id = null; protected ?int $userId = null; - #[Pattern('[A-z]+')] - #[MinLength(3)] - #[MaxLength(16)] protected ?string $title = null; protected ?\PSX\DateTime\LocalDateTime $date = null; public function setId(?int $id) : void diff --git a/tests/Generator/Client/resource/php/EntryUpdate.php b/tests/Generator/Client/resource/php/EntryUpdate.php index 1a7f9955..829472be 100644 --- a/tests/Generator/Client/resource/php/EntryUpdate.php +++ b/tests/Generator/Client/resource/php/EntryUpdate.php @@ -4,19 +4,10 @@ * @see https://sdkgen.app */ -use PSX\Schema\Attribute\MaxLength; -use PSX\Schema\Attribute\MinLength; -use PSX\Schema\Attribute\Pattern; -use PSX\Schema\Attribute\Required; - -#[Required(array('id'))] class EntryUpdate implements \JsonSerializable, \PSX\Record\RecordableInterface { protected ?int $id = null; protected ?int $userId = null; - #[Pattern('[A-z]+')] - #[MinLength(3)] - #[MaxLength(16)] protected ?string $title = null; protected ?\PSX\DateTime\LocalDateTime $date = null; public function setId(?int $id) : void diff --git a/tests/Generator/Client/resource/php_collection/Entry.php b/tests/Generator/Client/resource/php_collection/Entry.php index 2e117a43..3cb3e43d 100644 --- a/tests/Generator/Client/resource/php_collection/Entry.php +++ b/tests/Generator/Client/resource/php_collection/Entry.php @@ -6,17 +6,11 @@ namespace Foo\Bar; -use PSX\Schema\Attribute\MaxLength; -use PSX\Schema\Attribute\MinLength; -use PSX\Schema\Attribute\Pattern; class Entry implements \JsonSerializable, \PSX\Record\RecordableInterface { protected ?int $id = null; protected ?int $userId = null; - #[Pattern('[A-z]+')] - #[MinLength(3)] - #[MaxLength(16)] protected ?string $title = null; protected ?\PSX\DateTime\LocalDateTime $date = null; public function setId(?int $id) : void diff --git a/tests/Generator/Client/resource/php_collection/EntryCreate.php b/tests/Generator/Client/resource/php_collection/EntryCreate.php index 94b18130..a55a14fd 100644 --- a/tests/Generator/Client/resource/php_collection/EntryCreate.php +++ b/tests/Generator/Client/resource/php_collection/EntryCreate.php @@ -6,19 +6,11 @@ namespace Foo\Bar; -use PSX\Schema\Attribute\MaxLength; -use PSX\Schema\Attribute\MinLength; -use PSX\Schema\Attribute\Pattern; -use PSX\Schema\Attribute\Required; -#[Required(array('title', 'date'))] class EntryCreate implements \JsonSerializable, \PSX\Record\RecordableInterface { protected ?int $id = null; protected ?int $userId = null; - #[Pattern('[A-z]+')] - #[MinLength(3)] - #[MaxLength(16)] protected ?string $title = null; protected ?\PSX\DateTime\LocalDateTime $date = null; public function setId(?int $id) : void diff --git a/tests/Generator/Client/resource/php_test/TestMapObject.php b/tests/Generator/Client/resource/php_test/TestMapObject.php index cab6d28c..6cb88413 100644 --- a/tests/Generator/Client/resource/php_test/TestMapObject.php +++ b/tests/Generator/Client/resource/php_test/TestMapObject.php @@ -7,8 +7,8 @@ namespace Sdkgen\Client\Tests\Generated; /** - * @extends \PSX\Record\Record + * @extends \ArrayObject */ -class TestMapObject extends \PSX\Record\Record +class TestMapObject extends \ArrayObject { } diff --git a/tests/Generator/Client/resource/php_test/TestMapScalar.php b/tests/Generator/Client/resource/php_test/TestMapScalar.php index 01437afc..862bce61 100644 --- a/tests/Generator/Client/resource/php_test/TestMapScalar.php +++ b/tests/Generator/Client/resource/php_test/TestMapScalar.php @@ -7,8 +7,8 @@ namespace Sdkgen\Client\Tests\Generated; /** - * @extends \PSX\Record\Record + * @extends \ArrayObject */ -class TestMapScalar extends \PSX\Record\Record +class TestMapScalar extends \ArrayObject { } diff --git a/tests/Generator/Client/resource/typescript/Client.ts b/tests/Generator/Client/resource/typescript/Client.ts index bd22b112..f79c75ea 100644 --- a/tests/Generator/Client/resource/typescript/Client.ts +++ b/tests/Generator/Client/resource/typescript/Client.ts @@ -114,12 +114,12 @@ export class Client extends ClientAbstract { } /** - * @returns {Promise>} + * @returns {Promise>} * @throws {EntryMessageException} * @throws {MapEntryMessageException} * @throws {ClientException} */ - public async update(name: string, type: string, payload: Record): Promise> { + public async update(name: string, type: string, payload: Map): Promise> { const url = this.parser.url('/foo/:name/:type', { 'name': name, 'type': type, @@ -138,7 +138,7 @@ export class Client extends ClientAbstract { }; try { - const response = await this.httpClient.request>(params); + const response = await this.httpClient.request>(params); return response.data; } catch (error) { if (error instanceof ClientException) { diff --git a/tests/Generator/Client/resource/typescript/Entry.ts b/tests/Generator/Client/resource/typescript/Entry.ts index b50aaa0c..9cd75dff 100644 --- a/tests/Generator/Client/resource/typescript/Entry.ts +++ b/tests/Generator/Client/resource/typescript/Entry.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export interface Entry { +export class Entry { id?: number userId?: number title?: string diff --git a/tests/Generator/Client/resource/typescript/EntryCollection.ts b/tests/Generator/Client/resource/typescript/EntryCollection.ts index 1f8e50b2..b7893c58 100644 --- a/tests/Generator/Client/resource/typescript/EntryCollection.ts +++ b/tests/Generator/Client/resource/typescript/EntryCollection.ts @@ -4,6 +4,6 @@ */ import {Entry} from "./Entry"; -export interface EntryCollection { +export class EntryCollection { entry?: Array } diff --git a/tests/Generator/Client/resource/typescript/EntryCreate.ts b/tests/Generator/Client/resource/typescript/EntryCreate.ts index ec66486d..ba35a582 100644 --- a/tests/Generator/Client/resource/typescript/EntryCreate.ts +++ b/tests/Generator/Client/resource/typescript/EntryCreate.ts @@ -3,9 +3,9 @@ * {@link https://sdkgen.app} */ -export interface EntryCreate { +export class EntryCreate { id?: number userId?: number - title: string - date: string + title?: string + date?: string } diff --git a/tests/Generator/Client/resource/typescript/EntryDelete.ts b/tests/Generator/Client/resource/typescript/EntryDelete.ts index 102bbf92..2b482038 100644 --- a/tests/Generator/Client/resource/typescript/EntryDelete.ts +++ b/tests/Generator/Client/resource/typescript/EntryDelete.ts @@ -3,8 +3,8 @@ * {@link https://sdkgen.app} */ -export interface EntryDelete { - id: number +export class EntryDelete { + id?: number userId?: number title?: string date?: string diff --git a/tests/Generator/Client/resource/typescript/EntryMessage.ts b/tests/Generator/Client/resource/typescript/EntryMessage.ts index 3c733c2b..eecb5a7f 100644 --- a/tests/Generator/Client/resource/typescript/EntryMessage.ts +++ b/tests/Generator/Client/resource/typescript/EntryMessage.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export interface EntryMessage { +export class EntryMessage { success?: boolean message?: string } diff --git a/tests/Generator/Client/resource/typescript/EntryPatch.ts b/tests/Generator/Client/resource/typescript/EntryPatch.ts index d901ed0b..8be65514 100644 --- a/tests/Generator/Client/resource/typescript/EntryPatch.ts +++ b/tests/Generator/Client/resource/typescript/EntryPatch.ts @@ -3,8 +3,8 @@ * {@link https://sdkgen.app} */ -export interface EntryPatch { - id: number +export class EntryPatch { + id?: number userId?: number title?: string date?: string diff --git a/tests/Generator/Client/resource/typescript/EntryUpdate.ts b/tests/Generator/Client/resource/typescript/EntryUpdate.ts index 984816ce..92b88932 100644 --- a/tests/Generator/Client/resource/typescript/EntryUpdate.ts +++ b/tests/Generator/Client/resource/typescript/EntryUpdate.ts @@ -3,8 +3,8 @@ * {@link https://sdkgen.app} */ -export interface EntryUpdate { - id: number +export class EntryUpdate { + id?: number userId?: number title?: string date?: string diff --git a/tests/Generator/Client/resource/typescript/MapEntryMessageException.ts b/tests/Generator/Client/resource/typescript/MapEntryMessageException.ts index 93b7f791..1480b8bb 100644 --- a/tests/Generator/Client/resource/typescript/MapEntryMessageException.ts +++ b/tests/Generator/Client/resource/typescript/MapEntryMessageException.ts @@ -9,11 +9,11 @@ import {EntryMessage} from "./EntryMessage"; export class MapEntryMessageException extends KnownStatusCodeException { - public constructor(private payload: Record) { + public constructor(private payload: Map) { super('The server returned an error'); } - public getPayload(): Record { + public getPayload(): Map { return this.payload; } diff --git a/tests/Generator/Client/resource/typescript_collection/Entry.ts b/tests/Generator/Client/resource/typescript_collection/Entry.ts index b50aaa0c..9cd75dff 100644 --- a/tests/Generator/Client/resource/typescript_collection/Entry.ts +++ b/tests/Generator/Client/resource/typescript_collection/Entry.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export interface Entry { +export class Entry { id?: number userId?: number title?: string diff --git a/tests/Generator/Client/resource/typescript_collection/EntryCollection.ts b/tests/Generator/Client/resource/typescript_collection/EntryCollection.ts index 1f8e50b2..b7893c58 100644 --- a/tests/Generator/Client/resource/typescript_collection/EntryCollection.ts +++ b/tests/Generator/Client/resource/typescript_collection/EntryCollection.ts @@ -4,6 +4,6 @@ */ import {Entry} from "./Entry"; -export interface EntryCollection { +export class EntryCollection { entry?: Array } diff --git a/tests/Generator/Client/resource/typescript_collection/EntryCreate.ts b/tests/Generator/Client/resource/typescript_collection/EntryCreate.ts index ec66486d..ba35a582 100644 --- a/tests/Generator/Client/resource/typescript_collection/EntryCreate.ts +++ b/tests/Generator/Client/resource/typescript_collection/EntryCreate.ts @@ -3,9 +3,9 @@ * {@link https://sdkgen.app} */ -export interface EntryCreate { +export class EntryCreate { id?: number userId?: number - title: string - date: string + title?: string + date?: string } diff --git a/tests/Generator/Client/resource/typescript_collection/EntryMessage.ts b/tests/Generator/Client/resource/typescript_collection/EntryMessage.ts index 3c733c2b..eecb5a7f 100644 --- a/tests/Generator/Client/resource/typescript_collection/EntryMessage.ts +++ b/tests/Generator/Client/resource/typescript_collection/EntryMessage.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export interface EntryMessage { +export class EntryMessage { success?: boolean message?: string } diff --git a/tests/Generator/Client/resource/typescript_import/MySchema.ts b/tests/Generator/Client/resource/typescript_import/MySchema.ts index f50ce9ca..6eb17444 100644 --- a/tests/Generator/Client/resource/typescript_import/MySchema.ts +++ b/tests/Generator/Client/resource/typescript_import/MySchema.ts @@ -4,6 +4,6 @@ */ import {MyType} from "./../foo/MyType"; -export interface MySchema { +export class MySchema { foo?: MyType } diff --git a/tests/Generator/Client/resource/typescript_test/TestMapObject.ts b/tests/Generator/Client/resource/typescript_test/TestMapObject.ts index bd410bac..65f1c755 100644 --- a/tests/Generator/Client/resource/typescript_test/TestMapObject.ts +++ b/tests/Generator/Client/resource/typescript_test/TestMapObject.ts @@ -4,4 +4,5 @@ */ import {TestObject} from "./TestObject"; -export type TestMapObject = Record; +export class TestMapObject extends Map { +} diff --git a/tests/Generator/Client/resource/typescript_test/TestMapScalar.ts b/tests/Generator/Client/resource/typescript_test/TestMapScalar.ts index 6b48faa0..0a449599 100644 --- a/tests/Generator/Client/resource/typescript_test/TestMapScalar.ts +++ b/tests/Generator/Client/resource/typescript_test/TestMapScalar.ts @@ -3,4 +3,5 @@ * {@link https://sdkgen.app} */ -export type TestMapScalar = Record; +export class TestMapScalar extends Map { +} diff --git a/tests/Generator/Client/resource/typescript_test/TestObject.ts b/tests/Generator/Client/resource/typescript_test/TestObject.ts index 659d10f3..b0d90110 100644 --- a/tests/Generator/Client/resource/typescript_test/TestObject.ts +++ b/tests/Generator/Client/resource/typescript_test/TestObject.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export interface TestObject { +export class TestObject { id?: number name?: string } diff --git a/tests/Generator/Client/resource/typescript_test/TestRequest.ts b/tests/Generator/Client/resource/typescript_test/TestRequest.ts index 7c38e0c0..daea58e8 100644 --- a/tests/Generator/Client/resource/typescript_test/TestRequest.ts +++ b/tests/Generator/Client/resource/typescript_test/TestRequest.ts @@ -6,7 +6,7 @@ import {TestObject} from "./TestObject"; import {TestMapScalar} from "./TestMapScalar"; import {TestMapObject} from "./TestMapObject"; -export interface TestRequest { +export class TestRequest { int?: number float?: number string?: string diff --git a/tests/Generator/Client/resource/typescript_test/TestResponse.ts b/tests/Generator/Client/resource/typescript_test/TestResponse.ts index f560e249..0a771954 100644 --- a/tests/Generator/Client/resource/typescript_test/TestResponse.ts +++ b/tests/Generator/Client/resource/typescript_test/TestResponse.ts @@ -5,7 +5,7 @@ import {TestMapScalar} from "./TestMapScalar"; import {TestRequest} from "./TestRequest"; -export interface TestResponse { +export class TestResponse { args?: TestMapScalar data?: string files?: TestMapScalar diff --git a/tests/Generator/GeneratorTestCase.php b/tests/Generator/GeneratorTestCase.php index c32840c0..61e2d991 100644 --- a/tests/Generator/GeneratorTestCase.php +++ b/tests/Generator/GeneratorTestCase.php @@ -30,6 +30,9 @@ use PSX\Schema\Definitions; use PSX\Schema\Format; use PSX\Schema\Generator\Code\Chunks; +use PSX\Schema\Type\Factory\DefinitionTypeFactory; +use PSX\Schema\Type\Factory\PropertyTypeFactory; +use PSX\Schema\Type\ReferencePropertyType; use PSX\Schema\Type\StructType; use PSX\Schema\TypeFactory; use PSX\Schema\TypeInterface; @@ -55,52 +58,46 @@ protected function getSpecification(): SpecificationInterface $delete = $this->addSchema($builder, Schema\Delete::class); $patch = $this->addSchema($builder, Schema\Patch::class); - $operation = $builder->addOperation('get', 'GET', '/foo/:name/:type', 200, $collection); + $operation = $builder->addOperation('get', 'GET', '/foo/:name/:type', 200, PropertyTypeFactory::getReference($collection)); $operation->setDescription('Returns a collection'); - $operation->addArgument('name', ArgumentInterface::IN_PATH, TypeFactory::getString() - ->setDescription('Name parameter') - ->setMinLength(0) - ->setMaxLength(16) - ->setPattern('[A-z]+')); - $operation->addArgument('type', ArgumentInterface::IN_PATH, TypeFactory::getString() - ->setEnum(['foo', 'bar'])); - $operation->addArgument('startIndex', ArgumentInterface::IN_QUERY, TypeFactory::getInteger() - ->setDescription('startIndex parameter') - ->setMinimum(0) - ->setMaximum(32)); - $operation->addArgument('float', ArgumentInterface::IN_QUERY, TypeFactory::getNumber()); - $operation->addArgument('boolean', ArgumentInterface::IN_QUERY, TypeFactory::getBoolean()); - $operation->addArgument('date', ArgumentInterface::IN_QUERY, TypeFactory::getString() + $operation->addArgument('name', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString() + ->setDescription('Name parameter')); + $operation->addArgument('type', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString()); + $operation->addArgument('startIndex', ArgumentInterface::IN_QUERY, PropertyTypeFactory::getInteger() + ->setDescription('startIndex parameter')); + $operation->addArgument('float', ArgumentInterface::IN_QUERY, PropertyTypeFactory::getNumber()); + $operation->addArgument('boolean', ArgumentInterface::IN_QUERY, PropertyTypeFactory::getBoolean()); + $operation->addArgument('date', ArgumentInterface::IN_QUERY, PropertyTypeFactory::getString() ->setFormat(Format::DATE)); - $operation->addArgument('datetime', ArgumentInterface::IN_QUERY, TypeFactory::getString() + $operation->addArgument('datetime', ArgumentInterface::IN_QUERY, PropertyTypeFactory::getString() ->setFormat(Format::DATETIME)); - $operation->addArgument('args', ArgumentInterface::IN_QUERY, TypeFactory::getReference('Entry')); - - $operation = $builder->addOperation('create', 'POST', '/foo/:name/:type', 201, $message); - $operation->addArgument('name', ArgumentInterface::IN_PATH, TypeFactory::getString()); - $operation->addArgument('type', ArgumentInterface::IN_PATH, TypeFactory::getString()); - $operation->addArgument('payload', ArgumentInterface::IN_BODY, $create); - $operation->addThrow(400, $message); - $operation->addThrow(500, $message); - - $operation = $builder->addOperation('update', 'PUT', '/foo/:name/:type', 200, TypeFactory::getMap($message)); - $operation->addArgument('name', ArgumentInterface::IN_PATH, TypeFactory::getString()); - $operation->addArgument('type', ArgumentInterface::IN_PATH, TypeFactory::getString()); - $operation->addArgument('payload', ArgumentInterface::IN_BODY, TypeFactory::getMap($update)); - $operation->addThrow(400, $message); - $operation->addThrow(500, TypeFactory::getMap($message)); - - $operation = $builder->addOperation('delete', 'DELETE', '/foo/:name/:type', 204, $message); - $operation->addArgument('name', ArgumentInterface::IN_PATH, TypeFactory::getString()); - $operation->addArgument('type', ArgumentInterface::IN_PATH, TypeFactory::getString()); - $operation->addArgument('payload', ArgumentInterface::IN_BODY, $delete); - - $operation = $builder->addOperation('patch', 'PATCH', '/foo/:name/:type', 200, TypeFactory::getArray($message)); - $operation->addArgument('name', ArgumentInterface::IN_PATH, TypeFactory::getString()); - $operation->addArgument('type', ArgumentInterface::IN_PATH, TypeFactory::getString()); - $operation->addArgument('payload', ArgumentInterface::IN_BODY, TypeFactory::getArray($patch)); - $operation->addThrow(400, $message); - $operation->addThrow(500, TypeFactory::getArray($message)); + $operation->addArgument('args', ArgumentInterface::IN_QUERY, PropertyTypeFactory::getReference('Entry')); + + $operation = $builder->addOperation('create', 'POST', '/foo/:name/:type', 201, PropertyTypeFactory::getReference($message)); + $operation->addArgument('name', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString()); + $operation->addArgument('type', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString()); + $operation->addArgument('payload', ArgumentInterface::IN_BODY, PropertyTypeFactory::getReference($create)); + $operation->addThrow(400, PropertyTypeFactory::getReference($message)); + $operation->addThrow(500, PropertyTypeFactory::getReference($message)); + + $operation = $builder->addOperation('update', 'PUT', '/foo/:name/:type', 200, PropertyTypeFactory::getMap(PropertyTypeFactory::getReference($message))); + $operation->addArgument('name', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString()); + $operation->addArgument('type', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString()); + $operation->addArgument('payload', ArgumentInterface::IN_BODY, PropertyTypeFactory::getMap(PropertyTypeFactory::getReference($update))); + $operation->addThrow(400, PropertyTypeFactory::getReference($message)); + $operation->addThrow(500, PropertyTypeFactory::getMap(PropertyTypeFactory::getReference($message))); + + $operation = $builder->addOperation('delete', 'DELETE', '/foo/:name/:type', 204, PropertyTypeFactory::getReference($message)); + $operation->addArgument('name', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString()); + $operation->addArgument('type', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString()); + $operation->addArgument('payload', ArgumentInterface::IN_BODY, PropertyTypeFactory::getReference($delete)); + + $operation = $builder->addOperation('patch', 'PATCH', '/foo/:name/:type', 200, PropertyTypeFactory::getArray(PropertyTypeFactory::getReference($message))); + $operation->addArgument('name', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString()); + $operation->addArgument('type', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString()); + $operation->addArgument('payload', ArgumentInterface::IN_BODY, PropertyTypeFactory::getArray(PropertyTypeFactory::getReference($patch))); + $operation->addThrow(400, PropertyTypeFactory::getReference($message)); + $operation->addThrow(500, PropertyTypeFactory::getArray(PropertyTypeFactory::getReference($message))); return $builder->getSpecification(); } @@ -114,51 +111,33 @@ protected function getSpecificationCollection(): SpecificationInterface $message = $this->addSchema($builder, Schema\Message::class); $create = $this->addSchema($builder, Schema\Create::class); - $operation = $builder->addOperation('foo.bar.get', 'GET', '/foo', 200, $collection); + $operation = $builder->addOperation('foo.bar.get', 'GET', '/foo', 200, PropertyTypeFactory::getReference($collection)); $operation->setDescription('Returns a collection'); $operation->setTags(['foo']); - $operation = $builder->addOperation('foo.bar.create', 'POST', '/foo', 201, $message); + $operation = $builder->addOperation('foo.bar.create', 'POST', '/foo', 201, PropertyTypeFactory::getReference($message)); $operation->setTags(['foo']); - $operation->addArgument('payload', 'body', $create); - $operation->addThrow(400, $message); - $operation->addThrow(500, $message); + $operation->addArgument('payload', 'body', PropertyTypeFactory::getReference($create)); + $operation->addThrow(400, PropertyTypeFactory::getReference($message)); + $operation->addThrow(500, PropertyTypeFactory::getReference($message)); - $operation = $builder->addOperation('bar.find', 'GET', '/bar/:foo', 200, $collection); + $operation = $builder->addOperation('bar.find', 'GET', '/bar/:foo', 200, PropertyTypeFactory::getReference($collection)); $operation->setDescription('Returns a collection'); $operation->setTags(['bar']); - $operation->addArgument('foo', 'path', TypeFactory::getString()); + $operation->addArgument('foo', 'path', PropertyTypeFactory::getString()); - $operation = $builder->addOperation('bar.put', 'POST', '/bar/:foo', 201, $message); + $operation = $builder->addOperation('bar.put', 'POST', '/bar/:foo', 201, PropertyTypeFactory::getReference($message)); $operation->setTags(['bar']); - $operation->addArgument('payload', 'body', $create); + $operation->addArgument('payload', 'body', PropertyTypeFactory::getReference($create)); - $operation = $builder->addOperation('foo.baz.get', 'GET', '/bar/$year<[0-9]+>', 200, $collection); + $operation = $builder->addOperation('foo.baz.get', 'GET', '/bar/$year<[0-9]+>', 200, PropertyTypeFactory::getReference($collection)); $operation->setDescription('Returns a collection'); $operation->setTags(['baz']); - $operation->addArgument('year', 'path', TypeFactory::getString()); + $operation->addArgument('year', 'path', PropertyTypeFactory::getString()); - $operation = $builder->addOperation('foo.baz.create', 'POST', '/bar/$year<[0-9]+>', 201, $message); + $operation = $builder->addOperation('foo.baz.create', 'POST', '/bar/$year<[0-9]+>', 201, PropertyTypeFactory::getReference($message)); $operation->setTags(['baz']); - $operation->addArgument('payload', 'body', $create); - - return $builder->getSpecification(); - } - - protected function getSpecificationComplex(): SpecificationInterface - { - $builder = $this->apiManager->getBuilder(); - $builder->setSecurity(new HttpBearer()); - - $complex = $this->addSchema($builder, Schema\Complex::class); - - $operation = $builder->addOperation('get', 'GET', '/foo/:name/:type', 200, $complex); - $operation->setDescription('Returns a collection'); - $operation->setTags(['foo']); - $operation->setSecurity(['foo']); - $operation->addArgument('name', 'path', TypeFactory::getString()); - $operation->addArgument('type', 'path', TypeFactory::getString()); - $operation->addArgument('payload', 'body', $complex); + $operation->addArgument('payload', 'body', PropertyTypeFactory::getReference($create)); return $builder->getSpecification(); } @@ -171,57 +150,57 @@ protected function getSpecificationTest(): SpecificationInterface $testRequest = $this->addSchema($builder, Schema\TestRequest::class); $testResponse = $this->addSchema($builder, Schema\TestResponse::class); - $operation = $builder->addOperation('product.getAll', 'GET', '/anything', 200, $testResponse); + $operation = $builder->addOperation('product.getAll', 'GET', '/anything', 200, PropertyTypeFactory::getReference($testResponse)); $operation->setDescription('Returns a collection'); - $operation->addArgument('startIndex', 'query', TypeFactory::getInteger()); - $operation->addArgument('count', 'query', TypeFactory::getInteger()); - $operation->addArgument('search', 'query', TypeFactory::getString()); + $operation->addArgument('startIndex', 'query', PropertyTypeFactory::getInteger()); + $operation->addArgument('count', 'query', PropertyTypeFactory::getInteger()); + $operation->addArgument('search', 'query', PropertyTypeFactory::getString()); - $operation = $builder->addOperation('product.create', 'POST', '/anything', 200, $testResponse); + $operation = $builder->addOperation('product.create', 'POST', '/anything', 200, PropertyTypeFactory::getReference($testResponse)); $operation->setDescription('Creates a new product'); - $operation->addArgument('payload', 'body', $testRequest); - $operation->addThrow(500, $testResponse); + $operation->addArgument('payload', 'body', PropertyTypeFactory::getReference($testRequest)); + $operation->addThrow(500, PropertyTypeFactory::getReference($testResponse)); - $operation = $builder->addOperation('product.update', 'PUT', '/anything/:id', 200, $testResponse); + $operation = $builder->addOperation('product.update', 'PUT', '/anything/:id', 200, PropertyTypeFactory::getReference($testResponse)); $operation->setDescription('Updates an existing product'); - $operation->addArgument('id', 'path', TypeFactory::getInteger()); - $operation->addArgument('payload', 'body', $testRequest); + $operation->addArgument('id', 'path', PropertyTypeFactory::getInteger()); + $operation->addArgument('payload', 'body', PropertyTypeFactory::getReference($testRequest)); - $operation = $builder->addOperation('product.patch', 'PATCH', '/anything/:id', 200, $testResponse); + $operation = $builder->addOperation('product.patch', 'PATCH', '/anything/:id', 200, PropertyTypeFactory::getReference($testResponse)); $operation->setDescription('Patches an existing product'); - $operation->addArgument('id', 'path', TypeFactory::getInteger()); - $operation->addArgument('payload', 'body', $testRequest); + $operation->addArgument('id', 'path', PropertyTypeFactory::getInteger()); + $operation->addArgument('payload', 'body', PropertyTypeFactory::getReference($testRequest)); - $operation = $builder->addOperation('product.delete', 'DELETE', '/anything/:id', 200, $testResponse); + $operation = $builder->addOperation('product.delete', 'DELETE', '/anything/:id', 200, PropertyTypeFactory::getReference($testResponse)); $operation->setDescription('Deletes an existing product'); - $operation->addArgument('id', 'path', TypeFactory::getInteger()); + $operation->addArgument('id', 'path', PropertyTypeFactory::getInteger()); - $operation = $builder->addOperation('product.binary', 'POST', '/anything/binary', 200, $testResponse); + $operation = $builder->addOperation('product.binary', 'POST', '/anything/binary', 200, PropertyTypeFactory::getReference($testResponse)); $operation->setDescription('Test binary content type'); $operation->addArgument('payload', 'body', new ContentType(ContentType::BINARY)); $operation->addThrow(500, new ContentType(ContentType::BINARY)); - $operation = $builder->addOperation('product.form', 'POST', '/anything/form', 200, $testResponse); + $operation = $builder->addOperation('product.form', 'POST', '/anything/form', 200, PropertyTypeFactory::getReference($testResponse)); $operation->setDescription('Test form content type'); $operation->addArgument('payload', 'body', new ContentType(ContentType::FORM)); $operation->addThrow(500, new ContentType(ContentType::FORM)); - $operation = $builder->addOperation('product.json', 'POST', '/anything/json', 200, $testResponse); + $operation = $builder->addOperation('product.json', 'POST', '/anything/json', 200, PropertyTypeFactory::getReference($testResponse)); $operation->setDescription('Test json content type'); $operation->addArgument('payload', 'body', new ContentType(ContentType::JSON)); $operation->addThrow(500, new ContentType(ContentType::JSON)); - $operation = $builder->addOperation('product.multipart', 'POST', '/anything/multipart', 200, $testResponse); + $operation = $builder->addOperation('product.multipart', 'POST', '/anything/multipart', 200, PropertyTypeFactory::getReference($testResponse)); $operation->setDescription('Test json content type'); $operation->addArgument('payload', 'body', new ContentType(ContentType::MULTIPART)); $operation->addThrow(500, new ContentType(ContentType::MULTIPART)); - $operation = $builder->addOperation('product.text', 'POST', '/anything/text', 200, $testResponse); + $operation = $builder->addOperation('product.text', 'POST', '/anything/text', 200, PropertyTypeFactory::getReference($testResponse)); $operation->setDescription('Test text content type'); $operation->addArgument('payload', 'body', new ContentType(ContentType::TEXT)); $operation->addThrow(500, new ContentType(ContentType::TEXT)); - $operation = $builder->addOperation('product.xml', 'POST', '/anything/xml', 200, $testResponse); + $operation = $builder->addOperation('product.xml', 'POST', '/anything/xml', 200, PropertyTypeFactory::getReference($testResponse)); $operation->setDescription('Test xml content type'); $operation->addArgument('payload', 'body', new ContentType(ContentType::XML)); $operation->addThrow(500, new ContentType(ContentType::XML)); @@ -265,13 +244,13 @@ protected function getSpecificationImport(): SpecificationInterface $builder = $this->apiManager->getBuilder(); $definitions = new Definitions(); - $definitions->addType('import:my_type', TypeFactory::getStruct()->addProperty('foo', TypeFactory::getString())); - $definitions->addType('my_schema', TypeFactory::getStruct()->addProperty('foo', TypeFactory::getReference('import:my_type'))); + $definitions->addType('import:my_type', DefinitionTypeFactory::getStruct()->addProperty('foo', PropertyTypeFactory::getString())); + $definitions->addType('my_schema', DefinitionTypeFactory::getStruct()->addProperty('foo', PropertyTypeFactory::getReference('import:my_type'))); $builder->addDefinitions($definitions); - $operation = $builder->addOperation('foo', 'GET', '/anything', 200, TypeFactory::getReference('import:my_type')); - $operation->addArgument('body', 'body', TypeFactory::getReference('import:my_type')); - $operation->addThrow(500, TypeFactory::getReference('import:my_type')); + $operation = $builder->addOperation('foo', 'GET', '/anything', 200, PropertyTypeFactory::getReference('import:my_type')); + $operation->addArgument('body', 'body', PropertyTypeFactory::getReference('import:my_type')); + $operation->addThrow(500, PropertyTypeFactory::getReference('import:my_type')); return $builder->getSpecification(); } @@ -286,10 +265,10 @@ protected function writeChunksToFolder(Chunks $result, string $target): void iterator_to_array($result->writeToFolder($target)); } - private function addSchema(SpecificationBuilderInterface $builder, string $schema): TypeInterface + private function addSchema(SpecificationBuilderInterface $builder, string $schema): string { $result = $this->schemaManager->getSchema($schema); $builder->addDefinitions($result->getDefinitions()); - return $result->getType(); + return $result->getRoot(); } } diff --git a/tests/Generator/Markup/resource/client.md b/tests/Generator/Markup/resource/client.md index 5d0d8799..bc01d9d6 100644 --- a/tests/Generator/Markup/resource/client.md +++ b/tests/Generator/Markup/resource/client.md @@ -1,50 +1,50 @@ const client = new Client() client.get(name: string, type: string, startIndex: number, float: number, boolean: boolean, date: string, datetime: string, args: Entry): EntryCollection client.create(name: string, type: string, payload: EntryCreate): EntryMessage throws EntryMessage -client.update(name: string, type: string, payload: Record): Record throws EntryMessage, Record +client.update(name: string, type: string, payload: Map): Map throws EntryMessage, Map client.delete(name: string, type: string): void client.patch(name: string, type: string, payload: Array): Array throws EntryMessage, Array -interface EntryCollection { +export class EntryCollection { entry?: Array } -interface Entry { +export class Entry { id?: number userId?: number title?: string date?: string } -interface EntryMessage { +export class EntryMessage { success?: boolean message?: string } -interface EntryCreate { +export class EntryCreate { id?: number userId?: number - title: string - date: string + title?: string + date?: string } -interface EntryUpdate { - id: number +export class EntryUpdate { + id?: number userId?: number title?: string date?: string } -interface EntryDelete { - id: number +export class EntryDelete { + id?: number userId?: number title?: string date?: string } -interface EntryPatch { - id: number +export class EntryPatch { + id?: number userId?: number title?: string date?: string diff --git a/tests/Generator/Markup/resource/client_collection.md b/tests/Generator/Markup/resource/client_collection.md index 67a81c33..070c62ed 100644 --- a/tests/Generator/Markup/resource/client_collection.md +++ b/tests/Generator/Markup/resource/client_collection.md @@ -7,25 +7,25 @@ client.bar().find(foo: string): EntryCollection client.bar().put(payload: EntryCreate): EntryMessage -interface EntryCollection { +export class EntryCollection { entry?: Array } -interface Entry { +export class Entry { id?: number userId?: number title?: string date?: string } -interface EntryMessage { +export class EntryMessage { success?: boolean message?: string } -interface EntryCreate { +export class EntryCreate { id?: number userId?: number - title: string - date: string + title?: string + date?: string } diff --git a/tests/Generator/Markup/resource/html.htm b/tests/Generator/Markup/resource/html.htm index b5219274..d0fcebc3 100644 --- a/tests/Generator/Markup/resource/html.htm +++ b/tests/Generator/Markup/resource/html.htm @@ -6,44 +6,44 @@

EntryCollection

{
   "entry": Array (Entry),
-}
FieldDescription
entryArray (Entry)
+}
FieldDescription
entryArray (Entry)

Entry

{
   "id": Integer,
   "userId": Integer,
   "title": String,
   "date": String (date-time),
-}
FieldDescription
idInteger
userIdInteger
titleString
MinLength
3
MaxLength
16
Pattern
[A-z]+
dateString (date-time)
+}
FieldDescription
idInteger
userIdInteger
titleString
dateString (date-time)

EntryMessage

{
   "success": Boolean,
   "message": String,
-}
FieldDescription
successBoolean
messageString
+}
FieldDescription
successBoolean
messageString

EntryCreate

{
   "id": Integer,
   "userId": Integer,
   "title": String,
   "date": String (date-time),
-}
FieldDescription
idInteger
userIdInteger
titleString
MinLength
3
MaxLength
16
Pattern
[A-z]+
dateString (date-time)
+}
FieldDescription
idInteger
userIdInteger
titleString
dateString (date-time)

EntryUpdate

{
   "id": Integer,
   "userId": Integer,
   "title": String,
   "date": String (date-time),
-}
FieldDescription
idInteger
userIdInteger
titleString
MinLength
3
MaxLength
16
Pattern
[A-z]+
dateString (date-time)
+}
FieldDescription
idInteger
userIdInteger
titleString
dateString (date-time)

EntryDelete

{
   "id": Integer,
   "userId": Integer,
   "title": String,
   "date": String (date-time),
-}
FieldDescription
idInteger
userIdInteger
titleString
MinLength
3
MaxLength
16
Pattern
[A-z]+
dateString (date-time)
+}
FieldDescription
idInteger
userIdInteger
titleString
dateString (date-time)

EntryPatch

{
   "id": Integer,
   "userId": Integer,
   "title": String,
   "date": String (date-time),
-}
FieldDescription
idInteger
userIdInteger
titleString
MinLength
3
MaxLength
16
Pattern
[A-z]+
dateString (date-time)
+}
FieldDescription
idInteger
userIdInteger
titleString
dateString (date-time)
diff --git a/tests/Generator/Markup/resource/markdown.md b/tests/Generator/Markup/resource/markdown.md index 117e6f1d..7ae4f313 100644 --- a/tests/Generator/Markup/resource/markdown.md +++ b/tests/Generator/Markup/resource/markdown.md @@ -62,44 +62,44 @@

EntryCollection

{
   "entry": Array (Entry),
-}
FieldDescription
entryArray (Entry)
+}
FieldDescription
entryArray (Entry)

Entry

{
   "id": Integer,
   "userId": Integer,
   "title": String,
   "date": String (date-time),
-}
FieldDescription
idInteger
userIdInteger
titleString
MinLength
3
MaxLength
16
Pattern
[A-z]+
dateString (date-time)
+}
FieldDescription
idInteger
userIdInteger
titleString
dateString (date-time)

EntryMessage

{
   "success": Boolean,
   "message": String,
-}
FieldDescription
successBoolean
messageString
+}
FieldDescription
successBoolean
messageString

EntryCreate

{
   "id": Integer,
   "userId": Integer,
   "title": String,
   "date": String (date-time),
-}
FieldDescription
idInteger
userIdInteger
titleString
MinLength
3
MaxLength
16
Pattern
[A-z]+
dateString (date-time)
+}
FieldDescription
idInteger
userIdInteger
titleString
dateString (date-time)

EntryUpdate

{
   "id": Integer,
   "userId": Integer,
   "title": String,
   "date": String (date-time),
-}
FieldDescription
idInteger
userIdInteger
titleString
MinLength
3
MaxLength
16
Pattern
[A-z]+
dateString (date-time)
+}
FieldDescription
idInteger
userIdInteger
titleString
dateString (date-time)

EntryDelete

{
   "id": Integer,
   "userId": Integer,
   "title": String,
   "date": String (date-time),
-}
FieldDescription
idInteger
userIdInteger
titleString
MinLength
3
MaxLength
16
Pattern
[A-z]+
dateString (date-time)
+}
FieldDescription
idInteger
userIdInteger
titleString
dateString (date-time)

EntryPatch

{
   "id": Integer,
   "userId": Integer,
   "title": String,
   "date": String (date-time),
-}
FieldDescription
idInteger
userIdInteger
titleString
MinLength
3
MaxLength
16
Pattern
[A-z]+
dateString (date-time)
+}
FieldDescription
idInteger
userIdInteger
titleString
dateString (date-time)
diff --git a/tests/Generator/Schema/Complex.php b/tests/Generator/Schema/Complex.php deleted file mode 100644 index b3c31da3..00000000 --- a/tests/Generator/Schema/Complex.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * Copyright (c) Christoph Kappestein - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -namespace PSX\Api\Tests\Generator\Schema; - -use PSX\Schema\SchemaAbstract; -use PSX\Schema\TypeFactory; - -/** - * Complex - * - * @author Christoph Kappestein - * @license http://www.apache.org/licenses/LICENSE-2.0 - * @link https://phpsx.org - */ -class Complex extends SchemaAbstract -{ - public function build(): void - { - $this->add('EntryOrMessage', TypeFactory::getUnion([ - $this->get(Entry::class), - $this->get(Message::class) - ])); - - $this->setRoot('EntryOrMessage'); - } -} diff --git a/tests/Generator/Schema/Create.php b/tests/Generator/Schema/Create.php index 23930a3e..c2e0dcb5 100644 --- a/tests/Generator/Schema/Create.php +++ b/tests/Generator/Schema/Create.php @@ -33,7 +33,6 @@ class Create extends SchemaAbstract { public function build(): void { - $entry = $this->modify(Entry::class, 'EntryCreate'); - $entry->setRequired(['title', 'date']); + $this->modify(Entry::class, 'EntryCreate'); } } diff --git a/tests/Generator/Schema/Delete.php b/tests/Generator/Schema/Delete.php index 60ddee8a..bd73dedf 100644 --- a/tests/Generator/Schema/Delete.php +++ b/tests/Generator/Schema/Delete.php @@ -33,7 +33,6 @@ class Delete extends SchemaAbstract { public function build(): void { - $entry = $this->modify(Entry::class, 'EntryDelete'); - $entry->setRequired(['id']); + $this->modify(Entry::class, 'EntryDelete'); } } diff --git a/tests/Generator/Schema/Entry.php b/tests/Generator/Schema/Entry.php index bf6bc891..8fcb6b80 100644 --- a/tests/Generator/Schema/Entry.php +++ b/tests/Generator/Schema/Entry.php @@ -36,10 +36,7 @@ public function build(): void $type = $this->newStruct('Entry'); $type->addInteger('id'); $type->addInteger('userId'); - $type->addString('title') - ->setMinLength(3) - ->setMaxLength(16) - ->setPattern('[A-z]+'); + $type->addString('title'); $type->addDateTime('date'); } } diff --git a/tests/Generator/Schema/Patch.php b/tests/Generator/Schema/Patch.php index 65d14cad..0b6d92ec 100644 --- a/tests/Generator/Schema/Patch.php +++ b/tests/Generator/Schema/Patch.php @@ -33,7 +33,6 @@ class Patch extends SchemaAbstract { public function build(): void { - $entry = $this->modify(Entry::class, 'EntryPatch'); - $entry->setRequired(['id']); + $this->modify(Entry::class, 'EntryPatch'); } } diff --git a/tests/Generator/Schema/Update.php b/tests/Generator/Schema/Update.php index 1f2f241a..7f05a40b 100644 --- a/tests/Generator/Schema/Update.php +++ b/tests/Generator/Schema/Update.php @@ -33,7 +33,6 @@ class Update extends SchemaAbstract { public function build(): void { - $entry = $this->modify(Entry::class, 'EntryUpdate'); - $entry->setRequired(['id']); + $this->modify(Entry::class, 'EntryUpdate'); } } diff --git a/tests/Generator/Server/resource/php/src/Model/Entry.php b/tests/Generator/Server/resource/php/src/Model/Entry.php index e9ee19ff..339fb38d 100644 --- a/tests/Generator/Server/resource/php/src/Model/Entry.php +++ b/tests/Generator/Server/resource/php/src/Model/Entry.php @@ -6,17 +6,11 @@ namespace App\Model; -use PSX\Schema\Attribute\MaxLength; -use PSX\Schema\Attribute\MinLength; -use PSX\Schema\Attribute\Pattern; class Entry implements \JsonSerializable, \PSX\Record\RecordableInterface { protected ?int $id = null; protected ?int $userId = null; - #[Pattern('[A-z]+')] - #[MinLength(3)] - #[MaxLength(16)] protected ?string $title = null; protected ?\PSX\DateTime\LocalDateTime $date = null; public function setId(?int $id) : void diff --git a/tests/Generator/Server/resource/php/src/Model/EntryCreate.php b/tests/Generator/Server/resource/php/src/Model/EntryCreate.php index dda752cc..036bc577 100644 --- a/tests/Generator/Server/resource/php/src/Model/EntryCreate.php +++ b/tests/Generator/Server/resource/php/src/Model/EntryCreate.php @@ -6,19 +6,11 @@ namespace App\Model; -use PSX\Schema\Attribute\MaxLength; -use PSX\Schema\Attribute\MinLength; -use PSX\Schema\Attribute\Pattern; -use PSX\Schema\Attribute\Required; -#[Required(array('title', 'date'))] class EntryCreate implements \JsonSerializable, \PSX\Record\RecordableInterface { protected ?int $id = null; protected ?int $userId = null; - #[Pattern('[A-z]+')] - #[MinLength(3)] - #[MaxLength(16)] protected ?string $title = null; protected ?\PSX\DateTime\LocalDateTime $date = null; public function setId(?int $id) : void diff --git a/tests/Generator/Server/resource/php/src/Model/EntryDelete.php b/tests/Generator/Server/resource/php/src/Model/EntryDelete.php index 2422a5df..96dec146 100644 --- a/tests/Generator/Server/resource/php/src/Model/EntryDelete.php +++ b/tests/Generator/Server/resource/php/src/Model/EntryDelete.php @@ -6,19 +6,11 @@ namespace App\Model; -use PSX\Schema\Attribute\MaxLength; -use PSX\Schema\Attribute\MinLength; -use PSX\Schema\Attribute\Pattern; -use PSX\Schema\Attribute\Required; -#[Required(array('id'))] class EntryDelete implements \JsonSerializable, \PSX\Record\RecordableInterface { protected ?int $id = null; protected ?int $userId = null; - #[Pattern('[A-z]+')] - #[MinLength(3)] - #[MaxLength(16)] protected ?string $title = null; protected ?\PSX\DateTime\LocalDateTime $date = null; public function setId(?int $id) : void diff --git a/tests/Generator/Server/resource/php/src/Model/EntryPatch.php b/tests/Generator/Server/resource/php/src/Model/EntryPatch.php index d403db4f..d189fedf 100644 --- a/tests/Generator/Server/resource/php/src/Model/EntryPatch.php +++ b/tests/Generator/Server/resource/php/src/Model/EntryPatch.php @@ -6,19 +6,11 @@ namespace App\Model; -use PSX\Schema\Attribute\MaxLength; -use PSX\Schema\Attribute\MinLength; -use PSX\Schema\Attribute\Pattern; -use PSX\Schema\Attribute\Required; -#[Required(array('id'))] class EntryPatch implements \JsonSerializable, \PSX\Record\RecordableInterface { protected ?int $id = null; protected ?int $userId = null; - #[Pattern('[A-z]+')] - #[MinLength(3)] - #[MaxLength(16)] protected ?string $title = null; protected ?\PSX\DateTime\LocalDateTime $date = null; public function setId(?int $id) : void diff --git a/tests/Generator/Server/resource/php/src/Model/EntryUpdate.php b/tests/Generator/Server/resource/php/src/Model/EntryUpdate.php index 0b22eb6f..84a51cbd 100644 --- a/tests/Generator/Server/resource/php/src/Model/EntryUpdate.php +++ b/tests/Generator/Server/resource/php/src/Model/EntryUpdate.php @@ -6,19 +6,11 @@ namespace App\Model; -use PSX\Schema\Attribute\MaxLength; -use PSX\Schema\Attribute\MinLength; -use PSX\Schema\Attribute\Pattern; -use PSX\Schema\Attribute\Required; -#[Required(array('id'))] class EntryUpdate implements \JsonSerializable, \PSX\Record\RecordableInterface { protected ?int $id = null; protected ?int $userId = null; - #[Pattern('[A-z]+')] - #[MinLength(3)] - #[MaxLength(16)] protected ?string $title = null; protected ?\PSX\DateTime\LocalDateTime $date = null; public function setId(?int $id) : void diff --git a/tests/Generator/Server/resource/php_complex/src/Model/Entry.php b/tests/Generator/Server/resource/php_complex/src/Model/Entry.php index e9ee19ff..339fb38d 100644 --- a/tests/Generator/Server/resource/php_complex/src/Model/Entry.php +++ b/tests/Generator/Server/resource/php_complex/src/Model/Entry.php @@ -6,17 +6,11 @@ namespace App\Model; -use PSX\Schema\Attribute\MaxLength; -use PSX\Schema\Attribute\MinLength; -use PSX\Schema\Attribute\Pattern; class Entry implements \JsonSerializable, \PSX\Record\RecordableInterface { protected ?int $id = null; protected ?int $userId = null; - #[Pattern('[A-z]+')] - #[MinLength(3)] - #[MaxLength(16)] protected ?string $title = null; protected ?\PSX\DateTime\LocalDateTime $date = null; public function setId(?int $id) : void diff --git a/tests/Generator/Server/resource/php_complex/src/Model/EntryCreate.php b/tests/Generator/Server/resource/php_complex/src/Model/EntryCreate.php index dda752cc..036bc577 100644 --- a/tests/Generator/Server/resource/php_complex/src/Model/EntryCreate.php +++ b/tests/Generator/Server/resource/php_complex/src/Model/EntryCreate.php @@ -6,19 +6,11 @@ namespace App\Model; -use PSX\Schema\Attribute\MaxLength; -use PSX\Schema\Attribute\MinLength; -use PSX\Schema\Attribute\Pattern; -use PSX\Schema\Attribute\Required; -#[Required(array('title', 'date'))] class EntryCreate implements \JsonSerializable, \PSX\Record\RecordableInterface { protected ?int $id = null; protected ?int $userId = null; - #[Pattern('[A-z]+')] - #[MinLength(3)] - #[MaxLength(16)] protected ?string $title = null; protected ?\PSX\DateTime\LocalDateTime $date = null; public function setId(?int $id) : void diff --git a/tests/Generator/Server/resource/typescript/src/controller/app.controller.ts b/tests/Generator/Server/resource/typescript/src/controller/app.controller.ts index 6c1de0a8..0bd2d246 100644 --- a/tests/Generator/Server/resource/typescript/src/controller/app.controller.ts +++ b/tests/Generator/Server/resource/typescript/src/controller/app.controller.ts @@ -30,7 +30,7 @@ export class AppController { @Put('/foo/:name/:type') @HttpCode(200) - update(@Param('name') name: string, @Param('type') type: string, @Body() payload: Record): Record { + update(@Param('name') name: string, @Param('type') type: string, @Body() payload: Map): Map { // @TODO implement method return {}; } diff --git a/tests/Generator/Server/resource/typescript/src/dto/Entry.ts b/tests/Generator/Server/resource/typescript/src/dto/Entry.ts index b50aaa0c..9cd75dff 100644 --- a/tests/Generator/Server/resource/typescript/src/dto/Entry.ts +++ b/tests/Generator/Server/resource/typescript/src/dto/Entry.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export interface Entry { +export class Entry { id?: number userId?: number title?: string diff --git a/tests/Generator/Server/resource/typescript/src/dto/EntryCollection.ts b/tests/Generator/Server/resource/typescript/src/dto/EntryCollection.ts index 1f8e50b2..b7893c58 100644 --- a/tests/Generator/Server/resource/typescript/src/dto/EntryCollection.ts +++ b/tests/Generator/Server/resource/typescript/src/dto/EntryCollection.ts @@ -4,6 +4,6 @@ */ import {Entry} from "./Entry"; -export interface EntryCollection { +export class EntryCollection { entry?: Array } diff --git a/tests/Generator/Server/resource/typescript/src/dto/EntryCreate.ts b/tests/Generator/Server/resource/typescript/src/dto/EntryCreate.ts index ec66486d..ba35a582 100644 --- a/tests/Generator/Server/resource/typescript/src/dto/EntryCreate.ts +++ b/tests/Generator/Server/resource/typescript/src/dto/EntryCreate.ts @@ -3,9 +3,9 @@ * {@link https://sdkgen.app} */ -export interface EntryCreate { +export class EntryCreate { id?: number userId?: number - title: string - date: string + title?: string + date?: string } diff --git a/tests/Generator/Server/resource/typescript/src/dto/EntryDelete.ts b/tests/Generator/Server/resource/typescript/src/dto/EntryDelete.ts index 102bbf92..2b482038 100644 --- a/tests/Generator/Server/resource/typescript/src/dto/EntryDelete.ts +++ b/tests/Generator/Server/resource/typescript/src/dto/EntryDelete.ts @@ -3,8 +3,8 @@ * {@link https://sdkgen.app} */ -export interface EntryDelete { - id: number +export class EntryDelete { + id?: number userId?: number title?: string date?: string diff --git a/tests/Generator/Server/resource/typescript/src/dto/EntryMessage.ts b/tests/Generator/Server/resource/typescript/src/dto/EntryMessage.ts index 3c733c2b..eecb5a7f 100644 --- a/tests/Generator/Server/resource/typescript/src/dto/EntryMessage.ts +++ b/tests/Generator/Server/resource/typescript/src/dto/EntryMessage.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export interface EntryMessage { +export class EntryMessage { success?: boolean message?: string } diff --git a/tests/Generator/Server/resource/typescript/src/dto/EntryPatch.ts b/tests/Generator/Server/resource/typescript/src/dto/EntryPatch.ts index d901ed0b..8be65514 100644 --- a/tests/Generator/Server/resource/typescript/src/dto/EntryPatch.ts +++ b/tests/Generator/Server/resource/typescript/src/dto/EntryPatch.ts @@ -3,8 +3,8 @@ * {@link https://sdkgen.app} */ -export interface EntryPatch { - id: number +export class EntryPatch { + id?: number userId?: number title?: string date?: string diff --git a/tests/Generator/Server/resource/typescript/src/dto/EntryUpdate.ts b/tests/Generator/Server/resource/typescript/src/dto/EntryUpdate.ts index 984816ce..92b88932 100644 --- a/tests/Generator/Server/resource/typescript/src/dto/EntryUpdate.ts +++ b/tests/Generator/Server/resource/typescript/src/dto/EntryUpdate.ts @@ -3,8 +3,8 @@ * {@link https://sdkgen.app} */ -export interface EntryUpdate { - id: number +export class EntryUpdate { + id?: number userId?: number title?: string date?: string diff --git a/tests/Generator/Server/resource/typescript_complex/src/dto/Entry.ts b/tests/Generator/Server/resource/typescript_complex/src/dto/Entry.ts index b50aaa0c..9cd75dff 100644 --- a/tests/Generator/Server/resource/typescript_complex/src/dto/Entry.ts +++ b/tests/Generator/Server/resource/typescript_complex/src/dto/Entry.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export interface Entry { +export class Entry { id?: number userId?: number title?: string diff --git a/tests/Generator/Server/resource/typescript_complex/src/dto/EntryCollection.ts b/tests/Generator/Server/resource/typescript_complex/src/dto/EntryCollection.ts index 1f8e50b2..b7893c58 100644 --- a/tests/Generator/Server/resource/typescript_complex/src/dto/EntryCollection.ts +++ b/tests/Generator/Server/resource/typescript_complex/src/dto/EntryCollection.ts @@ -4,6 +4,6 @@ */ import {Entry} from "./Entry"; -export interface EntryCollection { +export class EntryCollection { entry?: Array } diff --git a/tests/Generator/Server/resource/typescript_complex/src/dto/EntryCreate.ts b/tests/Generator/Server/resource/typescript_complex/src/dto/EntryCreate.ts index ec66486d..ba35a582 100644 --- a/tests/Generator/Server/resource/typescript_complex/src/dto/EntryCreate.ts +++ b/tests/Generator/Server/resource/typescript_complex/src/dto/EntryCreate.ts @@ -3,9 +3,9 @@ * {@link https://sdkgen.app} */ -export interface EntryCreate { +export class EntryCreate { id?: number userId?: number - title: string - date: string + title?: string + date?: string } diff --git a/tests/Generator/Server/resource/typescript_complex/src/dto/EntryMessage.ts b/tests/Generator/Server/resource/typescript_complex/src/dto/EntryMessage.ts index 3c733c2b..eecb5a7f 100644 --- a/tests/Generator/Server/resource/typescript_complex/src/dto/EntryMessage.ts +++ b/tests/Generator/Server/resource/typescript_complex/src/dto/EntryMessage.ts @@ -3,7 +3,7 @@ * {@link https://sdkgen.app} */ -export interface EntryMessage { +export class EntryMessage { success?: boolean message?: string } diff --git a/tests/Generator/Spec/OpenAPITest.php b/tests/Generator/Spec/OpenAPITest.php index c2662b76..39bdfdd0 100644 --- a/tests/Generator/Spec/OpenAPITest.php +++ b/tests/Generator/Spec/OpenAPITest.php @@ -44,16 +44,6 @@ public function testGenerate() } public function testGenerateAll() - { - $generator = new OpenAPI(1, 'http://api.phpsx.org'); - - $actual = $generator->generate($this->getSpecificationCollection()); - $expect = file_get_contents(__DIR__ . '/resource/openapi_collection.json'); - - $this->assertJsonStringEqualsJsonString($expect, $actual, $actual); - } - - public function testGenerateComplex() { $generator = new OpenAPI(1, 'http://api.phpsx.org'); $generator->setTitle('Sample Pet Store App'); @@ -68,8 +58,8 @@ public function testGenerateComplex() $generator->addTag('foo', 'Foo tag'); $generator->addTag('bar', 'Boo tag'); - $actual = $generator->generate($this->getSpecificationComplex()); - $expect = file_get_contents(__DIR__ . '/resource/openapi_complex.json'); + $actual = $generator->generate($this->getSpecificationCollection()); + $expect = file_get_contents(__DIR__ . '/resource/openapi_collection.json'); $this->assertJsonStringEqualsJsonString($expect, $actual, $actual); } diff --git a/tests/Generator/Spec/TypeAPITest.php b/tests/Generator/Spec/TypeAPITest.php index 950c392c..8ca8f29e 100644 --- a/tests/Generator/Spec/TypeAPITest.php +++ b/tests/Generator/Spec/TypeAPITest.php @@ -51,14 +51,4 @@ public function testGenerateAll() $this->assertJsonStringEqualsJsonString($expect, $actual, $actual); } - - public function testGenerateComplex() - { - $generator = new TypeAPI(); - - $actual = $generator->generate($this->getSpecificationComplex()); - $expect = file_get_contents(__DIR__ . '/resource/typeapi_complex.json'); - - $this->assertJsonStringEqualsJsonString($expect, $actual, $actual); - } } diff --git a/tests/Generator/Spec/resource/openapi.json b/tests/Generator/Spec/resource/openapi.json index c171cc71..531e2935 100644 --- a/tests/Generator/Spec/resource/openapi.json +++ b/tests/Generator/Spec/resource/openapi.json @@ -22,9 +22,7 @@ "required": false, "schema": { "description": "startIndex parameter", - "type": "integer", - "minimum": 0, - "maximum": 32 + "type": "integer" } }, { @@ -48,8 +46,8 @@ "in": "query", "required": false, "schema": { - "format": "date", - "type": "string" + "type": "string", + "format": "date" } }, { @@ -57,8 +55,8 @@ "in": "query", "required": false, "schema": { - "format": "date-time", - "type": "string" + "type": "string", + "format": "date-time" } }, { @@ -289,14 +287,11 @@ "type": "integer" }, "title": { - "type": "string", - "pattern": "[A-z]+", - "minLength": 3, - "maxLength": 16 + "type": "string" }, "date": { - "format": "date-time", - "type": "string" + "type": "string", + "format": "date-time" } } }, @@ -321,20 +316,13 @@ "type": "integer" }, "title": { - "type": "string", - "pattern": "[A-z]+", - "minLength": 3, - "maxLength": 16 + "type": "string" }, "date": { - "format": "date-time", - "type": "string" + "type": "string", + "format": "date-time" } - }, - "required": [ - "title", - "date" - ] + } }, "EntryDelete": { "type": "object", @@ -346,19 +334,13 @@ "type": "integer" }, "title": { - "type": "string", - "pattern": "[A-z]+", - "minLength": 3, - "maxLength": 16 + "type": "string" }, "date": { - "format": "date-time", - "type": "string" + "type": "string", + "format": "date-time" } - }, - "required": [ - "id" - ] + } }, "EntryMessage": { "type": "object", @@ -381,19 +363,13 @@ "type": "integer" }, "title": { - "type": "string", - "pattern": "[A-z]+", - "minLength": 3, - "maxLength": 16 + "type": "string" }, "date": { - "format": "date-time", - "type": "string" + "type": "string", + "format": "date-time" } - }, - "required": [ - "id" - ] + } }, "EntryUpdate": { "type": "object", @@ -405,19 +381,13 @@ "type": "integer" }, "title": { - "type": "string", - "pattern": "[A-z]+", - "minLength": 3, - "maxLength": 16 + "type": "string" }, "date": { - "format": "date-time", - "type": "string" + "type": "string", + "format": "date-time" } - }, - "required": [ - "id" - ] + } } } } diff --git a/tests/Generator/Spec/resource/openapi_collection.json b/tests/Generator/Spec/resource/openapi_collection.json index a79e96c7..3eca45b3 100644 --- a/tests/Generator/Spec/resource/openapi_collection.json +++ b/tests/Generator/Spec/resource/openapi_collection.json @@ -1,7 +1,18 @@ { "openapi": "3.0.3", "info": { - "title": "PSX", + "title": "Sample Pet Store App", + "description": "This is a sample server for a pet store.", + "termsOfService": "http://example.com/terms/", + "contact": { + "name": "API Support", + "url": "http://www.example.com/support", + "email": "support@example.com" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, "version": "1" }, "servers": [ @@ -208,14 +219,11 @@ "type": "integer" }, "title": { - "type": "string", - "pattern": "[A-z]+", - "minLength": 3, - "maxLength": 16 + "type": "string" }, "date": { - "format": "date-time", - "type": "string" + "type": "string", + "format": "date-time" } } }, @@ -240,20 +248,13 @@ "type": "integer" }, "title": { - "type": "string", - "pattern": "[A-z]+", - "minLength": 3, - "maxLength": 16 + "type": "string" }, "date": { - "format": "date-time", - "type": "string" + "type": "string", + "format": "date-time" } - }, - "required": [ - "title", - "date" - ] + } }, "EntryMessage": { "type": "object", @@ -266,6 +267,31 @@ } } } + }, + "securitySchemes": { + "OAuth2": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "http://api.phpsx.org/authorization", + "tokenUrl": "http://api.phpsx.org/token", + "scopes": { + "foo": "Foo sope", + "bar": "Bar scope" + } + } + } + } + } + }, + "tags": [ + { + "name": "foo", + "description": "Foo tag" + }, + { + "name": "bar", + "description": "Boo tag" } - } + ] } \ No newline at end of file diff --git a/tests/Generator/Spec/resource/typeapi.json b/tests/Generator/Spec/resource/typeapi.json index 300a3515..b40d3b02 100644 --- a/tests/Generator/Spec/resource/typeapi.json +++ b/tests/Generator/Spec/resource/typeapi.json @@ -9,7 +9,8 @@ "return": { "code": 200, "schema": { - "$ref": "EntryCollection" + "type": "reference", + "target": "EntryCollection" } }, "arguments": { @@ -17,19 +18,12 @@ "in": "path", "schema": { "description": "Name parameter", - "type": "string", - "pattern": "[A-z]+", - "minLength": 0, - "maxLength": 16 + "type": "string" } }, "type": { "in": "path", "schema": { - "enum": [ - "foo", - "bar" - ], "type": "string" } }, @@ -37,9 +31,7 @@ "in": "query", "schema": { "description": "startIndex parameter", - "type": "integer", - "minimum": 0, - "maximum": 32 + "type": "integer" } }, "float": { @@ -57,21 +49,22 @@ "date": { "in": "query", "schema": { - "format": "date", - "type": "string" + "type": "string", + "format": "date" } }, "datetime": { "in": "query", "schema": { - "format": "date-time", - "type": "string" + "type": "string", + "format": "date-time" } }, "args": { "in": "query", "schema": { - "$ref": "Entry" + "type": "reference", + "target": "Entry" } } }, @@ -88,7 +81,8 @@ "return": { "code": 201, "schema": { - "$ref": "EntryMessage" + "type": "reference", + "target": "EntryMessage" } }, "arguments": { @@ -107,7 +101,8 @@ "payload": { "in": "body", "schema": { - "$ref": "EntryCreate" + "type": "reference", + "target": "EntryCreate" } } }, @@ -115,13 +110,15 @@ { "code": 400, "schema": { - "$ref": "EntryMessage" + "type": "reference", + "target": "EntryMessage" } }, { "code": 500, "schema": { - "$ref": "EntryMessage" + "type": "reference", + "target": "EntryMessage" } } ], @@ -137,9 +134,10 @@ "return": { "code": 200, "schema": { - "type": "object", - "additionalProperties": { - "$ref": "EntryMessage" + "type": "map", + "schema": { + "type": "reference", + "target": "EntryMessage" } } }, @@ -159,9 +157,10 @@ "payload": { "in": "body", "schema": { - "type": "object", - "additionalProperties": { - "$ref": "EntryUpdate" + "type": "map", + "schema": { + "type": "reference", + "target": "EntryUpdate" } } } @@ -170,15 +169,17 @@ { "code": 400, "schema": { - "$ref": "EntryMessage" + "type": "reference", + "target": "EntryMessage" } }, { "code": 500, "schema": { - "type": "object", - "additionalProperties": { - "$ref": "EntryMessage" + "type": "map", + "schema": { + "type": "reference", + "target": "EntryMessage" } } } @@ -195,7 +196,8 @@ "return": { "code": 204, "schema": { - "$ref": "EntryMessage" + "type": "reference", + "target": "EntryMessage" } }, "arguments": { @@ -214,7 +216,8 @@ "payload": { "in": "body", "schema": { - "$ref": "EntryDelete" + "type": "reference", + "target": "EntryDelete" } } }, @@ -232,8 +235,9 @@ "code": 200, "schema": { "type": "array", - "items": { - "$ref": "EntryMessage" + "schema": { + "type": "reference", + "target": "EntryMessage" } } }, @@ -254,8 +258,9 @@ "in": "body", "schema": { "type": "array", - "items": { - "$ref": "EntryPatch" + "schema": { + "type": "reference", + "target": "EntryPatch" } } } @@ -264,15 +269,17 @@ { "code": 400, "schema": { - "$ref": "EntryMessage" + "type": "reference", + "target": "EntryMessage" } }, { "code": 500, "schema": { "type": "array", - "items": { - "$ref": "EntryMessage" + "schema": { + "type": "reference", + "target": "EntryMessage" } } } @@ -286,7 +293,7 @@ }, "definitions": { "Entry": { - "type": "object", + "type": "struct", "properties": { "id": { "type": "integer" @@ -295,30 +302,28 @@ "type": "integer" }, "title": { - "type": "string", - "pattern": "[A-z]+", - "minLength": 3, - "maxLength": 16 + "type": "string" }, "date": { - "format": "date-time", - "type": "string" + "type": "string", + "format": "date-time" } } }, "EntryCollection": { - "type": "object", + "type": "struct", "properties": { "entry": { "type": "array", - "items": { - "$ref": "Entry" + "schema": { + "type": "reference", + "target": "Entry" } } } }, "EntryCreate": { - "type": "object", + "type": "struct", "properties": { "id": { "type": "integer" @@ -327,23 +332,16 @@ "type": "integer" }, "title": { - "type": "string", - "pattern": "[A-z]+", - "minLength": 3, - "maxLength": 16 + "type": "string" }, "date": { - "format": "date-time", - "type": "string" + "type": "string", + "format": "date-time" } - }, - "required": [ - "title", - "date" - ] + } }, "EntryDelete": { - "type": "object", + "type": "struct", "properties": { "id": { "type": "integer" @@ -352,22 +350,16 @@ "type": "integer" }, "title": { - "type": "string", - "pattern": "[A-z]+", - "minLength": 3, - "maxLength": 16 + "type": "string" }, "date": { - "format": "date-time", - "type": "string" + "type": "string", + "format": "date-time" } - }, - "required": [ - "id" - ] + } }, "EntryMessage": { - "type": "object", + "type": "struct", "properties": { "success": { "type": "boolean" @@ -378,7 +370,7 @@ } }, "EntryPatch": { - "type": "object", + "type": "struct", "properties": { "id": { "type": "integer" @@ -387,22 +379,16 @@ "type": "integer" }, "title": { - "type": "string", - "pattern": "[A-z]+", - "minLength": 3, - "maxLength": 16 + "type": "string" }, "date": { - "format": "date-time", - "type": "string" + "type": "string", + "format": "date-time" } - }, - "required": [ - "id" - ] + } }, "EntryUpdate": { - "type": "object", + "type": "struct", "properties": { "id": { "type": "integer" @@ -411,19 +397,13 @@ "type": "integer" }, "title": { - "type": "string", - "pattern": "[A-z]+", - "minLength": 3, - "maxLength": 16 + "type": "string" }, "date": { - "format": "date-time", - "type": "string" + "type": "string", + "format": "date-time" } - }, - "required": [ - "id" - ] + } } } } \ No newline at end of file diff --git a/tests/Generator/Spec/resource/typeapi_collection.json b/tests/Generator/Spec/resource/typeapi_collection.json index dc0844b6..9617bc6c 100644 --- a/tests/Generator/Spec/resource/typeapi_collection.json +++ b/tests/Generator/Spec/resource/typeapi_collection.json @@ -9,7 +9,8 @@ "return": { "code": 200, "schema": { - "$ref": "EntryCollection" + "type": "reference", + "target": "EntryCollection" } }, "arguments": [], @@ -28,14 +29,16 @@ "return": { "code": 201, "schema": { - "$ref": "EntryMessage" + "type": "reference", + "target": "EntryMessage" } }, "arguments": { "payload": { "in": "body", "schema": { - "$ref": "EntryCreate" + "type": "reference", + "target": "EntryCreate" } } }, @@ -43,13 +46,15 @@ { "code": 400, "schema": { - "$ref": "EntryMessage" + "type": "reference", + "target": "EntryMessage" } }, { "code": 500, "schema": { - "$ref": "EntryMessage" + "type": "reference", + "target": "EntryMessage" } } ], @@ -67,7 +72,8 @@ "return": { "code": 200, "schema": { - "$ref": "EntryCollection" + "type": "reference", + "target": "EntryCollection" } }, "arguments": { @@ -93,14 +99,16 @@ "return": { "code": 201, "schema": { - "$ref": "EntryMessage" + "type": "reference", + "target": "EntryMessage" } }, "arguments": { "payload": { "in": "body", "schema": { - "$ref": "EntryCreate" + "type": "reference", + "target": "EntryCreate" } } }, @@ -119,7 +127,8 @@ "return": { "code": 200, "schema": { - "$ref": "EntryCollection" + "type": "reference", + "target": "EntryCollection" } }, "arguments": { @@ -145,14 +154,16 @@ "return": { "code": 201, "schema": { - "$ref": "EntryMessage" + "type": "reference", + "target": "EntryMessage" } }, "arguments": { "payload": { "in": "body", "schema": { - "$ref": "EntryCreate" + "type": "reference", + "target": "EntryCreate" } } }, @@ -168,7 +179,7 @@ }, "definitions": { "Entry": { - "type": "object", + "type": "struct", "properties": { "id": { "type": "integer" @@ -177,30 +188,28 @@ "type": "integer" }, "title": { - "type": "string", - "pattern": "[A-z]+", - "minLength": 3, - "maxLength": 16 + "type": "string" }, "date": { - "format": "date-time", - "type": "string" + "type": "string", + "format": "date-time" } } }, "EntryCollection": { - "type": "object", + "type": "struct", "properties": { "entry": { "type": "array", - "items": { - "$ref": "Entry" + "schema": { + "type": "reference", + "target": "Entry" } } } }, "EntryCreate": { - "type": "object", + "type": "struct", "properties": { "id": { "type": "integer" @@ -209,23 +218,16 @@ "type": "integer" }, "title": { - "type": "string", - "pattern": "[A-z]+", - "minLength": 3, - "maxLength": 16 + "type": "string" }, "date": { - "format": "date-time", - "type": "string" + "type": "string", + "format": "date-time" } - }, - "required": [ - "title", - "date" - ] + } }, "EntryMessage": { - "type": "object", + "type": "struct", "properties": { "success": { "type": "boolean" diff --git a/tests/Inspector/ChangelogGeneratorTest.php b/tests/Inspector/ChangelogGeneratorTest.php index 7b64b232..44bf5c96 100644 --- a/tests/Inspector/ChangelogGeneratorTest.php +++ b/tests/Inspector/ChangelogGeneratorTest.php @@ -48,12 +48,12 @@ public function testGenerate() 'Operation "my.operation.get.method" has changed from "GET" to "PUT"', 'Operation "my.operation.get.path" has changed from "/my/endpoint" to "/my/endpoint/foo"', 'Operation "my.operation.get.return.code" has changed from "200" to "201"', - 'Type "my.operation.get.return" (reference) ref has changed from "Person" to "Message"', + 'Type "my.operation.get.return" (reference) target has changed from "Person" to "Message"', 'Operation "my.operation.get.arguments.id.in" has changed from "path" to "query"', 'Type "my.operation.get.arguments.id" (string) type has changed from "string" to "integer"', 'Operation "my.operation.get.arguments.search" was removed', 'Operation "my.operation.get.arguments.payload" was added', - 'Type "my.operation.get.throws.500" (reference) ref has changed from "Message" to "Person"', + 'Type "my.operation.get.throws.500" (reference) target has changed from "Message" to "Person"', 'Operation "my.operation.get.throws.400" was added', 'Operation "my.operation.get.description" has changed from "And a great description" to "And a great description foo"', 'Operation "my.operation.get.stability" has changed from "1" to "2"', @@ -87,12 +87,12 @@ public function testGenerateReverse() 'Operation "my.operation.get.method" has changed from "PUT" to "GET"', 'Operation "my.operation.get.path" has changed from "/my/endpoint/foo" to "/my/endpoint"', 'Operation "my.operation.get.return.code" has changed from "201" to "200"', - 'Type "my.operation.get.return" (reference) ref has changed from "Message" to "Person"', + 'Type "my.operation.get.return" (reference) target has changed from "Message" to "Person"', 'Operation "my.operation.get.arguments.id.in" has changed from "query" to "path"', 'Type "my.operation.get.arguments.id" (integer) type has changed from "integer" to "string"', 'Operation "my.operation.get.arguments.payload" was removed', 'Operation "my.operation.get.arguments.search" was added', - 'Type "my.operation.get.throws.500" (reference) ref has changed from "Person" to "Message"', + 'Type "my.operation.get.throws.500" (reference) target has changed from "Person" to "Message"', 'Operation "my.operation.get.throws.400" was removed', 'Operation "my.operation.get.description" has changed from "And a great description foo" to "And a great description"', 'Operation "my.operation.get.stability" has changed from "2" to "1"', diff --git a/tests/Parser/Attribute/TestController.php b/tests/Parser/Attribute/TestController.php index 140a4d99..c836bad2 100644 --- a/tests/Parser/Attribute/TestController.php +++ b/tests/Parser/Attribute/TestController.php @@ -42,15 +42,15 @@ */ #[Description('Test description')] #[Path('/foo/:fooId')] -#[PathParam(name: 'fooId', type: Type::STRING, required: true)] +#[PathParam(name: 'fooId', type: Type::STRING)] class TestController { #[Get] #[Description('file://' . __DIR__ . '/description.md')] #[QueryParam(name: "foo", type: Type::STRING, description: "Test")] - #[QueryParam(name: "bar", type: Type::STRING, required: true)] - #[QueryParam(name: "baz", type: Type::STRING, enum: ["foo", "bar"])] - #[QueryParam(name: "boz", type: Type::STRING, pattern: "[A-z]+")] + #[QueryParam(name: "bar", type: Type::STRING)] + #[QueryParam(name: "baz", type: Type::STRING)] + #[QueryParam(name: "boz", type: Type::STRING)] #[QueryParam(name: "integer", type: Type::INTEGER)] #[QueryParam(name: "number", type: Type::NUMBER)] #[QueryParam(name: "date", type: Type::STRING, format: Format::DATETIME)] diff --git a/tests/Parser/AttributeTest.php b/tests/Parser/AttributeTest.php index 5a028ff7..95f33d6a 100644 --- a/tests/Parser/AttributeTest.php +++ b/tests/Parser/AttributeTest.php @@ -30,6 +30,7 @@ use PSX\Api\Tests\Parser\Attribute\PropertyController; use PSX\Api\Tests\Parser\Attribute\TestController; use PSX\Schema\ContentType; +use PSX\Schema\Type\Factory\PropertyTypeFactory; use PSX\Schema\TypeFactory; use Symfony\Component\Cache\Adapter\ArrayAdapter; @@ -67,13 +68,13 @@ public function testParseTypeHint() $this->assertInstanceOf(OperationInterface::class, $operation); $this->assertEquals('path', $operation->getArguments()->get('id')->getIn()); - $this->assertEquals(TypeFactory::getInteger(), $operation->getArguments()->get('id')->getSchema()); + $this->assertEquals(PropertyTypeFactory::getInteger(), $operation->getArguments()->get('id')->getSchema()); $this->assertEquals('query', $operation->getArguments()->get('year')->getIn()); - $this->assertEquals(TypeFactory::getString(), $operation->getArguments()->get('year')->getSchema()); + $this->assertEquals(PropertyTypeFactory::getString(), $operation->getArguments()->get('year')->getSchema()); $this->assertEquals('body', $operation->getArguments()->get('incoming')->getIn()); - $this->assertEquals(TypeFactory::getReference('Incoming'), $operation->getArguments()->get('incoming')->getSchema()); + $this->assertEquals(PropertyTypeFactory::getReference('Incoming'), $operation->getArguments()->get('incoming')->getSchema()); $this->assertEquals(200, $operation->getReturn()->getCode()); - $this->assertEquals(TypeFactory::getReference('Outgoing'), $operation->getReturn()->getSchema()); + $this->assertEquals(PropertyTypeFactory::getReference('Outgoing'), $operation->getReturn()->getSchema()); } public function testParseInvalid() diff --git a/tests/Parser/OpenAPITest.php b/tests/Parser/OpenAPITest.php index 328b4661..3a565e39 100644 --- a/tests/Parser/OpenAPITest.php +++ b/tests/Parser/OpenAPITest.php @@ -23,6 +23,7 @@ use PSX\Api\OperationInterface; use PSX\Api\SpecificationInterface; use PSX\Schema\Format; +use PSX\Schema\Type\Factory\PropertyTypeFactory; use PSX\Schema\TypeFactory; /** @@ -55,26 +56,24 @@ public function testParsePetstore() $arguments = $operation->getArguments(); $this->assertEquals('query', $arguments->get('limit')->getIn()); - $this->assertEquals(['type' => 'integer', 'format' => Format::INT32, 'maximum' => 100], $arguments->get('limit')->getSchema()->toArray()); + $this->assertEquals(['type' => 'integer'], $arguments->get('limit')->getSchema()->toArray()); $this->assertEquals(200, $operation->getReturn()->getCode()); - $this->assertEquals(['$ref' => 'Pets'], $operation->getReturn()->getSchema()->toArray()); + $this->assertEquals(['type' => 'reference', 'target' => 'Pets'], $operation->getReturn()->getSchema()->toArray()); $this->assertCount(0, $operation->getThrows()); $this->assertEquals([ 'type' => 'array', - 'items' => TypeFactory::getReference('Pet'), - 'maxItems' => 100 + 'schema' => PropertyTypeFactory::getReference('Pet'), ], $definitions->getType('Pets')->toArray()); $this->assertEquals([ - 'type' => 'object', + 'type' => 'struct', 'properties' => [ - 'id' => TypeFactory::getInteger()->setFormat(Format::INT64), - 'name' => TypeFactory::getString(), - 'tag' => TypeFactory::getString() - ], - 'required' => ['id', 'name'] + 'id' => PropertyTypeFactory::getInteger(), + 'name' => PropertyTypeFactory::getString(), + 'tag' => PropertyTypeFactory::getString() + ] ], $definitions->getType('Pet')->toArray()); } diff --git a/tests/Parser/ParserTestCase.php b/tests/Parser/ParserTestCase.php index e4a278d3..7f0c9b07 100644 --- a/tests/Parser/ParserTestCase.php +++ b/tests/Parser/ParserTestCase.php @@ -24,6 +24,7 @@ use PSX\Api\SpecificationInterface; use PSX\Api\Tests\ApiManagerTestCase; use PSX\Schema\Format; +use PSX\Schema\Type\Factory\PropertyTypeFactory; use PSX\Schema\TypeFactory; /** @@ -55,9 +56,9 @@ public function testParseSimple() $this->assertEquals('query', $arguments->get('bar')->getIn()); $this->assertEquals(['type' => 'string'], $arguments->get('bar')->getSchema()->toArray()); $this->assertEquals('query', $arguments->get('baz')->getIn()); - $this->assertEquals(['type' => 'string', 'enum' => ['foo', 'bar']], $arguments->get('baz')->getSchema()->toArray()); + $this->assertEquals(['type' => 'string'], $arguments->get('baz')->getSchema()->toArray()); $this->assertEquals('query', $arguments->get('boz')->getIn()); - $this->assertEquals(['type' => 'string', 'pattern' => '[A-z]+'], $arguments->get('boz')->getSchema()->toArray()); + $this->assertEquals(['type' => 'string'], $arguments->get('boz')->getSchema()->toArray()); $this->assertEquals('query', $arguments->get('integer')->getIn()); $this->assertEquals(['type' => 'integer'], $arguments->get('integer')->getSchema()->toArray()); $this->assertEquals('query', $arguments->get('number')->getIn()); @@ -69,37 +70,33 @@ public function testParseSimple() $this->assertEquals('query', $arguments->get('string')->getIn()); $this->assertEquals(['type' => 'string'], $arguments->get('string')->getSchema()->toArray()); $this->assertEquals('body', $arguments->get('payload')->getIn()); - $this->assertEquals(['$ref' => 'Song'], $arguments->get('payload')->getSchema()->toArray()); + $this->assertEquals(['type' => 'reference', 'target' => 'Song'], $arguments->get('payload')->getSchema()->toArray()); $this->assertEquals(200, $operation->getReturn()->getCode()); - $this->assertEquals(['$ref' => 'Song'], $operation->getReturn()->getSchema()->toArray()); + $this->assertEquals(['type' => 'reference', 'target' => 'Song'], $operation->getReturn()->getSchema()->toArray()); $this->assertCount(1, $operation->getThrows()); $this->assertEquals(500, $operation->getThrows()[0]->getCode()); - $this->assertEquals(['$ref' => 'Error'], $operation->getThrows()[0]->getSchema()->toArray()); + $this->assertEquals(['type' => 'reference', 'target' => 'Error'], $operation->getThrows()[0]->getSchema()->toArray()); $this->assertEquals([ 'description' => 'A canonical song', - 'type' => 'object', + 'type' => 'struct', 'properties' => [ - 'title' => TypeFactory::getString(), - 'artist' => TypeFactory::getString(), - 'length' => TypeFactory::getInteger(), - 'ratings' => TypeFactory::getArray(TypeFactory::getReference('Rating')), - ], - 'required' => ['title', 'artist'] + 'title' => PropertyTypeFactory::getString(), + 'artist' => PropertyTypeFactory::getString(), + 'length' => PropertyTypeFactory::getInteger(), + 'ratings' => PropertyTypeFactory::getArray(PropertyTypeFactory::getReference('Rating')), + ] ], $definitions->getType('Song')->toArray()); $this->assertEquals([ - 'type' => 'object', + 'type' => 'struct', 'properties' => [ - 'success' => TypeFactory::getBoolean(), - 'message' => TypeFactory::getString(), + 'success' => PropertyTypeFactory::getBoolean(), + 'message' => PropertyTypeFactory::getString(), ], ], $definitions->getType('Error')->toArray()); } - /** - * @return \PSX\Api\SpecificationInterface - */ abstract protected function getSpecification(): SpecificationInterface; } From 4b8fb012a86a8e8c03ce8071848f698badf7a940 Mon Sep 17 00:00:00 2001 From: Christoph Kappestein Date: Wed, 9 Oct 2024 22:23:24 +0200 Subject: [PATCH 2/6] remove not needed reflection reader --- src/Parser/Attribute.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Parser/Attribute.php b/src/Parser/Attribute.php index 94ba6c5d..6eb183bc 100644 --- a/src/Parser/Attribute.php +++ b/src/Parser/Attribute.php @@ -42,7 +42,6 @@ use PSX\Schema\Format; use PSX\Schema\Parser\Context\FilesystemContext; use PSX\Schema\Parser\ContextInterface; -use PSX\Schema\Parser\Popo\ReflectionReader; use PSX\Schema\SchemaManagerInterface; use PSX\Schema\Type; use PSX\Schema\TypeInterface; @@ -59,7 +58,6 @@ class Attribute implements ParserInterface { private SchemaManagerInterface $schemaManager; private BuilderInterface $builder; - private ReflectionReader $reader; private bool $inspectTypeHints; public function __construct(SchemaManagerInterface $schemaManager, BuilderInterface $builder, bool $inspectTypeHints = true) @@ -67,7 +65,6 @@ public function __construct(SchemaManagerInterface $schemaManager, BuilderInterf $this->schemaManager = $schemaManager; $this->builder = $builder; $this->inspectTypeHints = $inspectTypeHints; - $this->reader = new ReflectionReader(); } /** From cafd5e012da9105f3427dab1879a16fdebde8772 Mon Sep 17 00:00:00 2001 From: Christoph Kappestein Date: Wed, 9 Oct 2024 22:23:37 +0200 Subject: [PATCH 3/6] fix tests --- src/Parser/OpenAPI.php | 43 +- src/Transformer/OpenAPI.php | 2 +- tests/Inspector/DevLifterTest.php | 2 +- tests/Parser/OpenAPITest.php | 8 +- .../openapi/expect/00_openapi.json | 5377 ++++++++++------- 5 files changed, 3289 insertions(+), 2143 deletions(-) diff --git a/src/Parser/OpenAPI.php b/src/Parser/OpenAPI.php index 02d69db4..ec7d189b 100644 --- a/src/Parser/OpenAPI.php +++ b/src/Parser/OpenAPI.php @@ -54,6 +54,7 @@ use PSX\Schema\DefinitionsInterface; use PSX\Schema\Exception\InvalidSchemaException; use PSX\Schema\Exception\TypeNotFoundException; +use PSX\Schema\Exception\UnknownTypeException; use PSX\Schema\Inspector\Hash; use PSX\Schema\Parser as SchemaParser; use PSX\Schema\Parser\ContextInterface; @@ -62,10 +63,12 @@ use PSX\Schema\SchemaTraverser; use PSX\Schema\Type\ArrayType; use PSX\Schema\Type\ArrayTypeInterface; +use PSX\Schema\Type\DefinitionTypeAbstract; use PSX\Schema\Type\Factory\PropertyTypeFactory; use PSX\Schema\Type\IntersectionType; use PSX\Schema\Type\MapType; use PSX\Schema\Type\MapTypeInterface; +use PSX\Schema\Type\PropertyTypeAbstract; use PSX\Schema\Type\ReferencePropertyType; use PSX\Schema\Type\ReferenceType; use PSX\Schema\Type\StructDefinitionType; @@ -376,8 +379,9 @@ private function parseResponseInRange(OpenAPIOperation $operation, int $start, i /** * @throws InvalidSchemaException + * @throws UnknownTypeException */ - private function getSchemaFromMediaTypes(MediaTypes $mediaTypes): ?TypeInterface + private function getSchemaFromMediaTypes(MediaTypes $mediaTypes): ?PropertyTypeAbstract { $mediaType = $mediaTypes['application/json'] ?? null; if (!$mediaType instanceof MediaType) { @@ -389,9 +393,12 @@ private function getSchemaFromMediaTypes(MediaTypes $mediaTypes): ?TypeInterface return null; } - $type = $this->schemaParser->parsePropertyType($schema); - - return $this->transformInlineStruct($type); + try { + return $this->schemaParser->parsePropertyType($schema); + } catch (UnknownTypeException $e) { + $type = $this->schemaParser->parseDefinitionType($schema); + return $this->transformInlineStruct($type); + } } /** @@ -400,30 +407,14 @@ private function getSchemaFromMediaTypes(MediaTypes $mediaTypes): ?TypeInterface * * @throws InvalidSchemaException */ - private function transformInlineStruct(TypeInterface $type): TypeInterface + private function transformInlineStruct(DefinitionTypeAbstract $type): PropertyTypeAbstract { - if ($type instanceof StructDefinitionType) { - // we have an inline struct type we automatically add this ot the definitions, since we have no name we generate - // it based on the type, this should motivate users to move the definition to the components section - $typeName = 'Inline' . substr($this->hashInspector->generateByType($type), 0, 8); - $this->definitions->addType($typeName, $type); - - return TypeFactory::getReference($typeName); - } elseif ($type instanceof MapTypeInterface) { - $schema = $type->getSchema(); - if ($schema instanceof TypeInterface) { - $r = $this->transformInlineStruct($schema); - return TypeFactory::getMap($r); - } - } elseif ($type instanceof ArrayTypeInterface) { - $schema = $type->getSchema(); - if ($schema instanceof TypeInterface) { - $r = $this->transformInlineStruct($schema); - return TypeFactory::getArray($r); - } - } + // we have an inline struct type we automatically add this ot the definitions, since we have no name we generate + // it based on the type, this should motivate users to move the definition to the components section + $typeName = 'Inline' . substr($this->hashInspector->generateByType($type), 0, 8); + $this->definitions->addType($typeName, $type); - return $type; + return PropertyTypeFactory::getReference($typeName); } private function resolveReference(string $reference) diff --git a/src/Transformer/OpenAPI.php b/src/Transformer/OpenAPI.php index 3a5042a8..d78f62f1 100644 --- a/src/Transformer/OpenAPI.php +++ b/src/Transformer/OpenAPI.php @@ -77,7 +77,7 @@ public function transformOperation(\stdClass $operation, \stdClass $spec): void if ($schema instanceof \stdClass) { $result = $this->transformer->transform($schema); - $response->content->{'application/json'}->schema = ['$ref' => $result->{'$ref'}]; + $response->content->{'application/json'}->schema = ['$ref' => $result->{'root'}]; foreach ($result->definitions as $name => $type) { $spec->components->schemas->{$name} = $type; diff --git a/tests/Inspector/DevLifterTest.php b/tests/Inspector/DevLifterTest.php index f7aac74d..50f4f14d 100644 --- a/tests/Inspector/DevLifterTest.php +++ b/tests/Inspector/DevLifterTest.php @@ -41,7 +41,7 @@ public function testGenerate() $lifter = new DevLifter(); $actual = $lifter->elevate('0.1.0', $left, $right); - $expect = '0.2.0'; + $expect = '0.1.1'; $this->assertEquals($expect, $actual); } diff --git a/tests/Parser/OpenAPITest.php b/tests/Parser/OpenAPITest.php index 3a565e39..f4b18f50 100644 --- a/tests/Parser/OpenAPITest.php +++ b/tests/Parser/OpenAPITest.php @@ -91,15 +91,15 @@ public function testParseInline() $this->assertTrue($operation->getArguments()->isEmpty()); $this->assertEquals(200, $operation->getReturn()->getCode()); - $this->assertEquals(['$ref' => 'Inline01fd4b61'], $operation->getReturn()->getSchema()->toArray()); + $this->assertEquals(['type' => 'reference', 'target' => 'Inline01fd4b61'], $operation->getReturn()->getSchema()->toArray()); $this->assertCount(0, $operation->getThrows()); $this->assertEquals([ - 'type' => 'object', + 'type' => 'struct', 'properties' => [ - 'success' => TypeFactory::getBoolean(), - 'message' => TypeFactory::getString(), + 'success' => PropertyTypeFactory::getBoolean(), + 'message' => PropertyTypeFactory::getString(), ], ], $definitions->getType('Inline01fd4b61')->toArray()); } diff --git a/tests/Transformer/openapi/expect/00_openapi.json b/tests/Transformer/openapi/expect/00_openapi.json index 03e6d46c..77f53b59 100644 --- a/tests/Transformer/openapi/expect/00_openapi.json +++ b/tests/Transformer/openapi/expect/00_openapi.json @@ -1,16 +1,16 @@ { "openapi": "3.0.3", "info": { - "description": "### EOSIO Contract API\n*Made with \u2665\ufe0f by [pink.gg](https:\/\/pink.gg\/)*\n#### Current Chain: wax-mainnet\n#### Provided by: [Zeptagram](https:\/\/zeptagram.com)", + "description": "### EOSIO Contract API\n*Made with ♥️ by [pink.gg](https://pink.gg/)*\n#### Current Chain: wax-mainnet\n#### Provided by: [Zeptagram](https://zeptagram.com)", "version": "1.2.12", "title": "EOSIO Contract API" }, "servers": [ { - "url": "https:\/\/wmnft.zeptagram.com" + "url": "https://wmnft.zeptagram.com" }, { - "url": "http:\/\/wmnft.zeptagram.com" + "url": "http://wmnft.zeptagram.com" } ], "tags": [ @@ -108,13 +108,13 @@ } ], "paths": { - "\/atomicassets\/v1\/assets": { + "/atomicassets/v1/assets": { "get": { "tags": [ "assets" ], "summary": "Fetch assets.", - "description": "You can filter the result by specific asset \/ template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", + "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", "parameters": [ { "name": "collection_name", @@ -434,9 +434,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline7013859f" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Asset" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -444,9 +460,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -454,7 +479,7 @@ } } }, - "\/atomicassets\/v1\/assets\/{asset_id}": { + "/atomicassets/v1/assets/{asset_id}": { "get": { "tags": [ "assets" @@ -475,9 +500,22 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2ea55b59" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "$ref": "#/components/schemas/Asset" + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -485,9 +523,18 @@ "416": { "description": "Element not found", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -495,9 +542,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -505,7 +561,7 @@ } } }, - "\/atomicassets\/v1\/assets\/{asset_id}\/stats": { + "/atomicassets/v1/assets/{asset_id}/stats": { "get": { "tags": [ "assets" @@ -526,9 +582,27 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline20d1dd35" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "object", + "properties": { + "template_mint": { + "type": "integer" + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -536,9 +610,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -546,7 +629,7 @@ } } }, - "\/atomicassets\/v1\/assets\/{asset_id}\/logs": { + "/atomicassets/v1/assets/{asset_id}/logs": { "get": { "tags": [ "assets" @@ -619,9 +702,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline3fd53df7" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Log" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -629,9 +728,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -639,7 +747,7 @@ } } }, - "\/atomicassets\/v1\/collections": { + "/atomicassets/v1/collections": { "get": { "tags": [ "collections" @@ -798,9 +906,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inlinecae37d48" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Collection" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -808,9 +932,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -818,7 +951,7 @@ } } }, - "\/atomicassets\/v1\/collections\/{collection_name}": { + "/atomicassets/v1/collections/{collection_name}": { "get": { "tags": [ "collections" @@ -839,9 +972,22 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inlineb3b9967c" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "$ref": "#/components/schemas/Collection" + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -849,9 +995,18 @@ "416": { "description": "Element not found", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -859,9 +1014,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -869,7 +1033,7 @@ } } }, - "\/atomicassets\/v1\/collections\/{collection_name}\/stats": { + "/atomicassets/v1/collections/{collection_name}/stats": { "get": { "tags": [ "collections" @@ -890,9 +1054,36 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inline28cb2593" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "object", + "properties": { + "assets": { + "type": "string" + }, + "burned": { + "type": "string" + }, + "templates": { + "type": "string" + }, + "schemas": { + "type": "string" + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -900,9 +1091,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -910,7 +1110,7 @@ } } }, - "\/atomicassets\/v1\/collections\/{collection_name}\/logs": { + "/atomicassets/v1/collections/{collection_name}/logs": { "get": { "tags": [ "collections" @@ -983,9 +1183,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline3fd53df7" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Log" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -993,9 +1209,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -1003,7 +1228,7 @@ } } }, - "\/atomicassets\/v1\/schemas": { + "/atomicassets/v1/schemas": { "get": { "tags": [ "schemas" @@ -1162,9 +1387,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2734e4b8" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Schema" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -1172,9 +1413,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -1182,7 +1432,7 @@ } } }, - "\/atomicassets\/v1\/schemas\/{collection_name}\/{schema_name}": { + "/atomicassets/v1/schemas/{collection_name}/{schema_name}": { "get": { "tags": [ "schemas" @@ -1212,9 +1462,22 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inlinea2fe30b0" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "$ref": "#/components/schemas/Schema" + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -1222,9 +1485,18 @@ "416": { "description": "Element not found", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -1232,9 +1504,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -1242,7 +1523,7 @@ } } }, - "\/atomicassets\/v1\/schemas\/{collection_name}\/{schema_name}\/stats": { + "/atomicassets/v1/schemas/{collection_name}/{schema_name}/stats": { "get": { "tags": [ "schemas" @@ -1272,9 +1553,33 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inline1b899a72" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "object", + "properties": { + "assets": { + "type": "string" + }, + "burned": { + "type": "string" + }, + "templates": { + "type": "string" + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -1282,9 +1587,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -1292,7 +1606,7 @@ } } }, - "\/atomicassets\/v1\/schemas\/{collection_name}\/{schema_name}\/logs": { + "/atomicassets/v1/schemas/{collection_name}/{schema_name}/logs": { "get": { "tags": [ "schemas" @@ -1374,9 +1688,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline3fd53df7" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Log" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -1384,9 +1714,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -1394,13 +1733,13 @@ } } }, - "\/atomicassets\/v1\/templates": { + "/atomicassets/v1/templates": { "get": { "tags": [ "templates" ], "summary": "Fetch templates.", - "description": "You can filter the result by specific asset \/ template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", + "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", "parameters": [ { "name": "collection_name", @@ -1617,9 +1956,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline1a1c0c3e" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Template" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -1627,9 +1982,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -1637,7 +2001,7 @@ } } }, - "\/atomicassets\/v1\/templates\/{collection_name}\/{template_id}": { + "/atomicassets/v1/templates/{collection_name}/{template_id}": { "get": { "tags": [ "templates" @@ -1667,9 +2031,22 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inlined7b3950c" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "$ref": "#/components/schemas/Template" + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -1677,9 +2054,18 @@ "416": { "description": "Element not found", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -1687,9 +2073,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -1697,7 +2092,7 @@ } } }, - "\/atomicassets\/v1\/templates\/{collection_name}\/{template_id}\/stats": { + "/atomicassets/v1/templates/{collection_name}/{template_id}/stats": { "get": { "tags": [ "templates" @@ -1727,9 +2122,30 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inlineacc80e6b" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "object", + "properties": { + "assets": { + "type": "string" + }, + "burned": { + "type": "string" + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -1737,9 +2153,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -1747,7 +2172,7 @@ } } }, - "\/atomicassets\/v1\/templates\/{collection_name}\/{template_id}\/logs": { + "/atomicassets/v1/templates/{collection_name}/{template_id}/logs": { "get": { "tags": [ "templates" @@ -1829,9 +2254,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline3fd53df7" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Log" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -1839,9 +2280,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -1849,7 +2299,7 @@ } } }, - "\/atomicassets\/v1\/offers": { + "/atomicassets/v1/offers": { "get": { "tags": [ "offers" @@ -2116,9 +2566,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline636db0a6" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Offer" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -2126,9 +2592,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -2136,7 +2611,7 @@ } } }, - "\/atomicassets\/v1\/offers\/{offer_id}": { + "/atomicassets/v1/offers/{offer_id}": { "get": { "tags": [ "offers" @@ -2157,9 +2632,22 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inlinec16cb6b4" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "$ref": "#/components/schemas/Offer" + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -2167,9 +2655,18 @@ "416": { "description": "Element not found", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -2177,9 +2674,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -2187,7 +2693,7 @@ } } }, - "\/atomicassets\/v1\/offers\/{offer_id}\/logs": { + "/atomicassets/v1/offers/{offer_id}/logs": { "get": { "tags": [ "offers" @@ -2260,9 +2766,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline3fd53df7" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Log" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -2270,9 +2792,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -2280,7 +2811,7 @@ } } }, - "\/atomicassets\/v1\/transfers": { + "/atomicassets/v1/transfers": { "get": { "tags": [ "transfers" @@ -2474,9 +3005,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline311842ae" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Transfer" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -2484,9 +3031,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -2494,7 +3050,7 @@ } } }, - "\/atomicassets\/v1\/accounts": { + "/atomicassets/v1/accounts": { "get": { "tags": [ "accounts" @@ -2630,9 +3186,33 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inlineffeae89e" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "account": { + "type": "string" + }, + "assets": { + "type": "string" + } + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -2640,9 +3220,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -2650,7 +3239,7 @@ } } }, - "\/atomicassets\/v1\/accounts\/{account}": { + "/atomicassets/v1/accounts/{account}": { "get": { "tags": [ "accounts" @@ -2698,9 +3287,58 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inlineb948cb9b" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "collections": { + "type": "array", + "items": { + "type": "object", + "properties": { + "collection": { + "$ref": "#/components/schemas/Collection" + }, + "assets": { + "type": "string" + } + } + } + }, + "templates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "template_id": { + "type": "string" + }, + "assets": { + "type": "string" + } + } + } + }, + "assets": { + "type": "string" + } + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -2708,9 +3346,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -2718,7 +3365,7 @@ } } }, - "\/atomicassets\/v1\/accounts\/{account}\/{collection_name}": { + "/atomicassets/v1/accounts/{account}/{collection_name}": { "get": { "tags": [ "accounts" @@ -2748,9 +3395,55 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inline87e7e216" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "templates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "template_id": { + "type": "string" + }, + "assets": { + "type": "string" + } + } + } + }, + "schemas": { + "type": "array", + "items": { + "type": "object", + "properties": { + "schema_name": { + "type": "string" + }, + "assets": { + "type": "string" + } + } + } + } + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -2758,9 +3451,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -2768,7 +3470,7 @@ } } }, - "\/atomicassets\/v1\/burns": { + "/atomicassets/v1/burns": { "get": { "tags": [ "burns" @@ -2886,9 +3588,33 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inlineffeae89e" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "account": { + "type": "string" + }, + "assets": { + "type": "string" + } + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -2896,9 +3622,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -2906,7 +3641,7 @@ } } }, - "\/atomicassets\/v1\/burns\/{account}": { + "/atomicassets/v1/burns/{account}": { "get": { "tags": [ "burns" @@ -2954,9 +3689,61 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inlined52801ac" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "collections": { + "type": "array", + "items": { + "type": "object", + "properties": { + "collection_name": { + "type": "string" + }, + "assets": { + "type": "string" + } + } + } + }, + "templates": { + "type": "array", + "items": { + "type": "object", + "properties": { + "collection_name": { + "type": "string" + }, + "template_id": { + "type": "string" + }, + "assets": { + "type": "string" + } + } + } + }, + "assets": { + "type": "string" + } + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -2964,9 +3751,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -2974,7 +3770,7 @@ } } }, - "\/atomicassets\/v1\/config": { + "/atomicassets/v1/config": { "get": { "tags": [ "config" @@ -2984,9 +3780,61 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inline1124b387" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "object", + "properties": { + "contract": { + "type": "string" + }, + "version": { + "type": "string" + }, + "collection_format": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + }, + "supported_tokens": { + "type": "array", + "items": { + "type": "object", + "properties": { + "token_contract": { + "type": "string" + }, + "token_symbol": { + "type": "string" + }, + "token_precision": { + "type": "integer" + } + } + } + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -2994,9 +3842,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -3004,13 +3861,13 @@ } } }, - "\/atomicmarket\/v1\/sales": { + "/atomicmarket/v1/sales": { "get": { "tags": [ "sales" ], "summary": "Get all sales. ", - "description": "You can filter the result by specific asset \/ template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", + "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", "parameters": [ { "name": "state", @@ -3419,9 +4276,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline563c4072" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sale" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -3429,9 +4302,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -3439,13 +4321,13 @@ } } }, - "\/atomicmarket\/v1\/sales\/templates": { + "/atomicmarket/v1/sales/templates": { "get": { "tags": [ "sales" ], "summary": "Get the cheapest sale grouped by templates. ", - "description": "You can filter the result by specific asset \/ template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", + "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", "parameters": [ { "name": "symbol", @@ -3689,9 +4571,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline563c4072" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sale" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -3699,9 +4597,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -3709,7 +4616,7 @@ } } }, - "\/atomicmarket\/v1\/sales\/{sale_id}": { + "/atomicmarket/v1/sales/{sale_id}": { "get": { "tags": [ "sales" @@ -3730,9 +4637,22 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline4a0559e2" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "$ref": "#/components/schemas/Sale" + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -3740,9 +4660,18 @@ "416": { "description": "Element not found", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -3750,9 +4679,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -3760,7 +4698,7 @@ } } }, - "\/atomicmarket\/v1\/sales\/{sale_id}\/logs": { + "/atomicmarket/v1/sales/{sale_id}/logs": { "get": { "tags": [ "sales" @@ -3833,9 +4771,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline3fd53df7" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Log" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -3843,9 +4797,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -3853,13 +4816,13 @@ } } }, - "\/atomicmarket\/v1\/auctions": { + "/atomicmarket/v1/auctions": { "get": { "tags": [ "auctions" ], "summary": "Get all auctions.", - "description": "You can filter the result by specific asset \/ template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", + "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", "parameters": [ { "name": "state", @@ -3882,7 +4845,7 @@ { "name": "participant", "in": "query", - "description": "Filter by auctions where this account participated and can still claim \/ bid", + "description": "Filter by auctions where this account participated and can still claim / bid", "required": false, "schema": { "type": "string" @@ -4287,9 +5250,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline5d957a23" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Auction" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -4297,9 +5276,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -4307,7 +5295,7 @@ } } }, - "\/atomicmarket\/v1\/auctions\/{auction_id}": { + "/atomicmarket/v1/auctions/{auction_id}": { "get": { "tags": [ "auctions" @@ -4328,9 +5316,22 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline07db2bcf" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "$ref": "#/components/schemas/Auction" + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -4338,9 +5339,18 @@ "416": { "description": "Element not found", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -4348,9 +5358,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -4358,7 +5377,7 @@ } } }, - "\/atomicmarket\/v1\/auctions\/{auction_id}\/logs": { + "/atomicmarket/v1/auctions/{auction_id}/logs": { "get": { "tags": [ "auctions" @@ -4431,9 +5450,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline3fd53df7" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Log" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -4441,9 +5476,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -4451,13 +5495,13 @@ } } }, - "\/atomicmarket\/v1\/buyoffers": { + "/atomicmarket/v1/buyoffers": { "get": { "tags": [ "buyoffers" ], "summary": "Get all buyoffers.", - "description": "You can filter the result by specific asset \/ template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", + "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", "parameters": [ { "name": "state", @@ -4866,9 +5910,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline004e82a0" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Buyoffer" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -4876,9 +5936,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -4886,7 +5955,7 @@ } } }, - "\/atomicmarket\/v1\/buyoffers\/{buyoffer_id}": { + "/atomicmarket/v1/buyoffers/{buyoffer_id}": { "get": { "tags": [ "buyoffers" @@ -4907,9 +5976,22 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline0841b879" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "$ref": "#/components/schemas/Buyoffer" + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -4917,9 +5999,18 @@ "416": { "description": "Element not found", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -4927,9 +6018,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -4937,7 +6037,7 @@ } } }, - "\/atomicmarket\/v1\/buyoffers\/{buyoffer_id}\/logs": { + "/atomicmarket/v1/buyoffers/{buyoffer_id}/logs": { "get": { "tags": [ "buyoffers" @@ -5010,9 +6110,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline3fd53df7" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Log" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -5020,9 +6136,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -5030,7 +6155,7 @@ } } }, - "\/atomicmarket\/v1\/marketplaces": { + "/atomicmarket/v1/marketplaces": { "get": { "tags": [ "marketplaces" @@ -5040,9 +6165,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline14ab017b" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Marketplace" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -5050,7 +6191,7 @@ } } }, - "\/atomicmarket\/v1\/marketplaces\/{marketplace_name}": { + "/atomicmarket/v1/marketplaces/{marketplace_name}": { "get": { "tags": [ "marketplaces" @@ -5071,9 +6212,22 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline0dbc05c9" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "$ref": "#/components/schemas/Marketplace" + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -5081,9 +6235,18 @@ "416": { "description": "Element not found", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -5091,9 +6254,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -5101,7 +6273,7 @@ } } }, - "\/atomicmarket\/v1\/assets\/{asset_id}\/sales": { + "/atomicmarket/v1/assets/{asset_id}/sales": { "get": { "tags": [ "assets" @@ -5163,9 +6335,57 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inlineb2e6fd35" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "sale_id": { + "type": "string" + }, + "auction_id": { + "type": "string" + }, + "buyoffer_id": { + "type": "string" + }, + "price": { + "type": "string" + }, + "token_symbol": { + "type": "string" + }, + "token_precision": { + "type": "integer" + }, + "token_contract": { + "type": "string" + }, + "seller": { + "type": "string" + }, + "buyer": { + "type": "string" + }, + "block_time": { + "type": "string" + } + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -5173,9 +6393,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -5183,7 +6412,7 @@ } } }, - "\/atomicmarket\/v1\/prices\/sales": { + "/atomicmarket/v1/prices/sales": { "get": { "tags": [ "pricing" @@ -5258,9 +6487,54 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inline85a8820c" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "sale_id": { + "type": "string" + }, + "auction_id": { + "type": "string" + }, + "buyoffer_id": { + "type": "string" + }, + "template_mint": { + "type": "string" + }, + "price": { + "type": "string" + }, + "token_symbol": { + "type": "string" + }, + "token_precision": { + "type": "integer" + }, + "token_contract": { + "type": "string" + }, + "block_time": { + "type": "string" + } + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -5268,9 +6542,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -5278,7 +6561,7 @@ } } }, - "\/atomicmarket\/v1\/prices\/sales\/days": { + "/atomicmarket/v1/prices/sales/days": { "get": { "tags": [ "pricing" @@ -5353,9 +6636,45 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inline6d90dcea" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "average": { + "type": "string" + }, + "median": { + "type": "string" + }, + "token_symbol": { + "type": "string" + }, + "token_precision": { + "type": "integer" + }, + "token_contract": { + "type": "string" + }, + "time": { + "type": "string" + } + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -5363,9 +6682,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -5373,7 +6701,7 @@ } } }, - "\/atomicmarket\/v1\/prices\/templates": { + "/atomicmarket/v1/prices/templates": { "get": { "tags": [ "pricing" @@ -5482,9 +6810,60 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inline74cdda32" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "token_symbol": { + "type": "string" + }, + "token_precision": { + "type": "integer" + }, + "token_contract": { + "type": "string" + }, + "collection_name": { + "type": "string" + }, + "template_id": { + "type": "string" + }, + "average": { + "type": "string" + }, + "median": { + "type": "string" + }, + "suggested_average": { + "type": "string" + }, + "suggested_median": { + "type": "string" + }, + "min": { + "type": "string" + }, + "max": { + "type": "string" + } + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -5492,9 +6871,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -5502,7 +6890,7 @@ } } }, - "\/atomicmarket\/v1\/prices\/assets": { + "/atomicmarket/v1/prices/assets": { "get": { "tags": [ "pricing" @@ -5712,9 +7100,54 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inline4eea33ed" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "token_symbol": { + "type": "string" + }, + "token_precision": { + "type": "integer" + }, + "token_contract": { + "type": "string" + }, + "median": { + "type": "string" + }, + "average": { + "type": "string" + }, + "suggested_average": { + "type": "string" + }, + "suggested_median": { + "type": "string" + }, + "min": { + "type": "string" + }, + "max": { + "type": "string" + } + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -5722,9 +7155,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -5732,7 +7174,7 @@ } } }, - "\/atomicmarket\/v1\/stats\/collections": { + "/atomicmarket/v1/stats/collections": { "get": { "tags": [ "stats" @@ -5864,9 +7306,94 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inlinecbc952ff" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "object", + "properties": { + "symbol": { + "type": "object", + "properties": { + "token_contract": { + "type": "string" + }, + "token_symbol": { + "type": "string" + }, + "token_precision": { + "type": "integer" + } + } + }, + "results": { + "type": "array", + "items": { + "type": "object", + "properties": { + "contract": { + "type": "string" + }, + "collection_name": { + "type": "string" + }, + "name": { + "type": "string" + }, + "author": { + "type": "string" + }, + "allow_notify": { + "type": "boolean" + }, + "authorized_accounts": { + "type": "array", + "items": { + "type": "string" + } + }, + "notify_accounts": { + "type": "array", + "items": { + "type": "string" + } + }, + "market_fee": { + "type": "number" + }, + "data": { + "type": "object" + }, + "created_at_block": { + "type": "string" + }, + "created_at_time": { + "type": "string" + }, + "listings": { + "type": "string" + }, + "volume": { + "type": "string" + }, + "sales": { + "type": "string" + } + } + } + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -5874,9 +7401,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -5884,7 +7420,7 @@ } } }, - "\/atomicmarket\/v1\/stats\/collections\/{collection_name}": { + "/atomicmarket/v1/stats/collections/{collection_name}": { "get": { "tags": [ "stats" @@ -5914,9 +7450,94 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inlinecbc952ff" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "object", + "properties": { + "symbol": { + "type": "object", + "properties": { + "token_contract": { + "type": "string" + }, + "token_symbol": { + "type": "string" + }, + "token_precision": { + "type": "integer" + } + } + }, + "results": { + "type": "array", + "items": { + "type": "object", + "properties": { + "contract": { + "type": "string" + }, + "collection_name": { + "type": "string" + }, + "name": { + "type": "string" + }, + "author": { + "type": "string" + }, + "allow_notify": { + "type": "boolean" + }, + "authorized_accounts": { + "type": "array", + "items": { + "type": "string" + } + }, + "notify_accounts": { + "type": "array", + "items": { + "type": "string" + } + }, + "market_fee": { + "type": "number" + }, + "data": { + "type": "object" + }, + "created_at_block": { + "type": "string" + }, + "created_at_time": { + "type": "string" + }, + "listings": { + "type": "string" + }, + "volume": { + "type": "string" + }, + "sales": { + "type": "string" + } + } + } + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -5924,9 +7545,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -5934,7 +7564,7 @@ } } }, - "\/atomicmarket\/v1\/stats\/accounts": { + "/atomicmarket/v1/stats/accounts": { "get": { "tags": [ "stats" @@ -6066,9 +7696,55 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inline37285df6" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "object", + "properties": { + "symbol": { + "type": "object", + "properties": { + "token_contract": { + "type": "string" + }, + "token_symbol": { + "type": "string" + }, + "token_precision": { + "type": "integer" + } + } + }, + "results": { + "type": "array", + "items": { + "type": "object", + "properties": { + "account": { + "type": "string" + }, + "buy_volume": { + "type": "string" + }, + "sell_volume": { + "type": "string" + } + } + } + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -6076,9 +7752,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -6086,7 +7771,7 @@ } } }, - "\/atomicmarket\/v1\/stats\/accounts\/{account}": { + "/atomicmarket/v1/stats/accounts/{account}": { "get": { "tags": [ "stats" @@ -6134,9 +7819,55 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inline3e1988f8" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "object", + "properties": { + "symbol": { + "type": "object", + "properties": { + "token_contract": { + "type": "string" + }, + "token_symbol": { + "type": "string" + }, + "token_precision": { + "type": "integer" + } + } + }, + "result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "account": { + "type": "string" + }, + "buy_volume": { + "type": "string" + }, + "sell_volume": { + "type": "string" + } + } + } + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -6144,9 +7875,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -6154,7 +7894,7 @@ } } }, - "\/atomicmarket\/v1\/stats\/schemas\/{collection_name}": { + "/atomicmarket/v1/stats/schemas/{collection_name}": { "get": { "tags": [ "stats" @@ -6277,9 +8017,55 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inline01d71b58" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "object", + "properties": { + "symbol": { + "type": "object", + "properties": { + "token_contract": { + "type": "string" + }, + "token_symbol": { + "type": "string" + }, + "token_precision": { + "type": "integer" + } + } + }, + "results": { + "type": "array", + "items": { + "type": "object", + "properties": { + "schema_name": { + "type": "string" + }, + "listings": { + "type": "string" + }, + "volume": { + "type": "string" + } + } + } + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -6287,9 +8073,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -6297,7 +8092,7 @@ } } }, - "\/atomicmarket\/v1\/stats\/graph": { + "/atomicmarket/v1/stats/graph": { "get": { "tags": [ "stats" @@ -6336,9 +8131,55 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inline03ec62d9" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "object", + "properties": { + "symbol": { + "type": "object", + "properties": { + "token_contract": { + "type": "string" + }, + "token_symbol": { + "type": "string" + }, + "token_precision": { + "type": "integer" + } + } + }, + "results": { + "type": "array", + "items": { + "type": "object", + "properties": { + "time": { + "type": "string" + }, + "volume": { + "type": "string" + }, + "sales": { + "type": "string" + } + } + } + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -6346,9 +8187,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -6356,7 +8206,7 @@ } } }, - "\/atomicmarket\/v1\/stats\/sales": { + "/atomicmarket/v1/stats/sales": { "get": { "tags": [ "stats" @@ -6395,9 +8245,49 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inlinee9e8d085" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "object", + "properties": { + "symbol": { + "type": "object", + "properties": { + "token_contract": { + "type": "string" + }, + "token_symbol": { + "type": "string" + }, + "token_precision": { + "type": "integer" + } + } + }, + "results": { + "type": "object", + "properties": { + "volume": { + "type": "string" + }, + "sales": { + "type": "string" + } + } + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -6405,9 +8295,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -6415,7 +8314,7 @@ } } }, - "\/atomicmarket\/v1\/config": { + "/atomicmarket/v1/config": { "get": { "tags": [ "config" @@ -6425,9 +8324,91 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inline4f499623" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "object", + "properties": { + "atomicassets_contract": { + "type": "string" + }, + "atomicmarket_contract": { + "type": "string" + }, + "delphioracle_contract": { + "type": "string" + }, + "version": { + "type": "string" + }, + "maker_market_fee": { + "type": "number" + }, + "taker_market_fee": { + "type": "number" + }, + "minimum_auction_duration": { + "type": "integer" + }, + "maximum_auction_duration": { + "type": "integer" + }, + "minimum_bid_increase": { + "type": "number" + }, + "auction_reset_duration": { + "type": "integer" + }, + "supported_tokens": { + "type": "array", + "items": { + "type": "object", + "properties": { + "token_contract": { + "type": "string" + }, + "token_symbol": { + "type": "string" + }, + "token_precision": { + "type": "integer" + } + } + } + }, + "supported_pairs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "listing_symbol": { + "type": "string" + }, + "settlement_symbol": { + "type": "string" + }, + "delphi_pair_name": { + "type": "string" + }, + "invert_delphi_pair": { + "type": "boolean" + } + } + } + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -6435,13 +8416,13 @@ } } }, - "\/atomicmarket\/v1\/assets": { + "/atomicmarket/v1/assets": { "get": { "tags": [ "assets" ], "summary": "Fetch assets.", - "description": "You can filter the result by specific asset \/ template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", + "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", "parameters": [ { "name": "collection_name", @@ -6765,9 +8746,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline96783c6c" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/undefined" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -6775,9 +8772,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -6785,7 +8791,7 @@ } } }, - "\/atomicmarket\/v1\/assets\/{asset_id}": { + "/atomicmarket/v1/assets/{asset_id}": { "get": { "tags": [ "assets" @@ -6806,9 +8812,22 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline359f6138" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "$ref": "#/components/schemas/ListingAsset" + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -6816,9 +8835,18 @@ "416": { "description": "Element not found", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -6826,9 +8854,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -6836,7 +8873,7 @@ } } }, - "\/atomicmarket\/v1\/assets\/{asset_id}\/stats": { + "/atomicmarket/v1/assets/{asset_id}/stats": { "get": { "tags": [ "assets" @@ -6857,9 +8894,27 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline20d1dd35" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "object", + "properties": { + "template_mint": { + "type": "integer" + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -6867,9 +8922,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -6877,7 +8941,7 @@ } } }, - "\/atomicmarket\/v1\/assets\/{asset_id}\/logs": { + "/atomicmarket/v1/assets/{asset_id}/logs": { "get": { "tags": [ "assets" @@ -6950,9 +9014,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline3fd53df7" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Log" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -6960,9 +9040,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -6970,7 +9059,7 @@ } } }, - "\/atomicmarket\/v1\/transfers": { + "/atomicmarket/v1/transfers": { "get": { "tags": [ "transfers" @@ -7164,9 +9253,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline382d5749" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ListingTransfer" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -7174,9 +9279,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -7184,7 +9298,7 @@ } } }, - "\/atomicmarket\/v1\/offers": { + "/atomicmarket/v1/offers": { "get": { "tags": [ "offers" @@ -7451,9 +9565,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline789aa161" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ListingOffer" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -7461,9 +9591,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -7471,7 +9610,7 @@ } } }, - "\/atomicmarket\/v1\/offers\/{offer_id}": { + "/atomicmarket/v1/offers/{offer_id}": { "get": { "tags": [ "offers" @@ -7492,9 +9631,22 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2c904cf9" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "$ref": "#/components/schemas/ListingOffer" + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -7502,9 +9654,18 @@ "416": { "description": "Element not found", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -7512,9 +9673,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -7522,7 +9692,7 @@ } } }, - "\/atomicmarket\/v1\/offers\/{offer_id}\/logs": { + "/atomicmarket/v1/offers/{offer_id}/logs": { "get": { "tags": [ "offers" @@ -7595,9 +9765,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline3fd53df7" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Log" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -7605,9 +9791,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -7615,7 +9810,7 @@ } } }, - "\/atomictools\/v1\/links": { + "/atomictools/v1/links": { "get": { "tags": [ "links" @@ -7773,9 +9968,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inlinedb18d4ba" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Link" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -7783,9 +9994,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -7793,7 +10013,7 @@ } } }, - "\/atomictools\/v1\/links\/{link_id}": { + "/atomictools/v1/links/{link_id}": { "get": { "tags": [ "links" @@ -7814,9 +10034,22 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline3a3cb959" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "$ref": "#/components/schemas/Link" + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -7824,9 +10057,18 @@ "416": { "description": "Element not found", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -7834,9 +10076,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -7844,7 +10095,7 @@ } } }, - "\/atomictools\/v1\/links\/{link_id}\/logs": { + "/atomictools/v1/links/{link_id}/logs": { "get": { "tags": [ "links" @@ -7917,9 +10168,25 @@ "200": { "description": "OK", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline3fd53df7" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Log" + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -7927,9 +10194,18 @@ "500": { "description": "Internal Server Error", "content": { - "application\/json": { + "application/json": { "schema": { - "$ref": "Inline2d859569" + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": false + }, + "message": { + "type": "string" + } + } } } } @@ -7937,7 +10213,7 @@ } } }, - "\/atomictools\/v1\/config": { + "/atomictools/v1/config": { "get": { "tags": [ "config" @@ -7947,9 +10223,33 @@ "200": { "description": "OK", "content": { - "application\/json": { - "schema": { - "$ref": "Inline7a0424ea" + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "default": true + }, + "data": { + "type": "object", + "properties": { + "atomictools_contract": { + "type": "string" + }, + "atomicassets_contract": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "query_time": { + "type": "integer", + "nullable": true + } + } } } } @@ -7960,11 +10260,7 @@ }, "components": { "schemas": { - "Inlinecdb728a8": { - "type": "object", - "properties": [] - }, - "Inline66e31af9": { + "Log": { "type": "object", "properties": { "log_id": { @@ -7974,7 +10270,7 @@ "type": "string" }, "data": { - "$ref": "Inlinecdb728a8" + "type": "object" }, "txid": { "type": "string" @@ -7987,125 +10283,7 @@ } } }, - "Log": { - "$ref": "Inline66e31af9" - }, - "Inline3bac70d7": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "market_fee": { - "type": "number" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "Inlineffffa488": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - } - }, - "Inline15733e28": { - "type": "object", - "properties": { - "schema_name": { - "type": "string" - }, - "format": { - "type": "array", - "items": { - "$ref": "Inlineffffa488" - } - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "Inline6db6c0a2": { - "type": "object", - "properties": { - "template_id": { - "type": "string" - }, - "max_supply": { - "type": "string" - }, - "issued_supply": { - "type": "string" - }, - "is_transferable": { - "type": "boolean" - }, - "is_burnable": { - "type": "boolean" - }, - "immutable_data": { - "$ref": "Inlinecdb728a8" - }, - "created_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - } - } - }, - "Inlinec529777e": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "amount": { - "type": "string" - } - } - }, - "Inline86faf907": { + "Asset": { "type": "object", "properties": { "contract": { @@ -8130,28 +10308,128 @@ "type": "string" }, "collection": { - "$ref": "Inline3bac70d7" + "type": "object", + "properties": { + "collection_name": { + "type": "string" + }, + "name": { + "type": "string" + }, + "author": { + "type": "string" + }, + "allow_notify": { + "type": "boolean" + }, + "authorized_accounts": { + "type": "array", + "items": { + "type": "string" + } + }, + "notify_accounts": { + "type": "array", + "items": { + "type": "string" + } + }, + "market_fee": { + "type": "number" + }, + "created_at_block": { + "type": "string" + }, + "created_at_time": { + "type": "string" + } + } }, "schema": { - "$ref": "Inline15733e28" + "type": "object", + "properties": { + "schema_name": { + "type": "string" + }, + "format": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + }, + "created_at_block": { + "type": "string" + }, + "created_at_time": { + "type": "string" + } + } }, "template": { - "$ref": "Inline6db6c0a2" + "type": "object", + "properties": { + "template_id": { + "type": "string" + }, + "max_supply": { + "type": "string" + }, + "issued_supply": { + "type": "string" + }, + "is_transferable": { + "type": "boolean" + }, + "is_burnable": { + "type": "boolean" + }, + "immutable_data": { + "type": "object" + }, + "created_at_time": { + "type": "string" + }, + "created_at_block": { + "type": "string" + } + } }, "backed_tokens": { "type": "array", "items": { - "$ref": "Inlinec529777e" + "type": "object", + "properties": { + "token_contract": { + "type": "string" + }, + "token_symbol": { + "type": "string" + }, + "token_precision": { + "type": "integer" + }, + "amount": { + "type": "string" + } + } } }, "immutable_data": { - "$ref": "Inlinecdb728a8" + "type": "object" }, "mutable_data": { - "$ref": "Inlinecdb728a8" + "type": "object" }, "data": { - "$ref": "Inlinecdb728a8" + "type": "object" }, "burned_by_account": { "type": "string" @@ -8182,10 +10460,7 @@ } } }, - "Asset": { - "$ref": "Inline86faf907" - }, - "Inline916e2892": { + "Collection": { "type": "object", "properties": { "contract": { @@ -8219,7 +10494,7 @@ "type": "number" }, "data": { - "$ref": "Inlinecdb728a8" + "type": "object" }, "created_at_block": { "type": "string" @@ -8229,10 +10504,7 @@ } } }, - "Collection": { - "$ref": "Inline916e2892" - }, - "Inlined10c0cac": { + "Schema": { "type": "object", "properties": { "contract": { @@ -8244,7 +10516,15 @@ "format": { "type": "array", "items": { - "$ref": "Inlineffffa488" + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } } }, "created_at_block": { @@ -8254,14 +10534,46 @@ "type": "string" }, "collection": { - "$ref": "Inline3bac70d7" + "type": "object", + "properties": { + "collection_name": { + "type": "string" + }, + "name": { + "type": "string" + }, + "author": { + "type": "string" + }, + "allow_notify": { + "type": "boolean" + }, + "authorized_accounts": { + "type": "array", + "items": { + "type": "string" + } + }, + "notify_accounts": { + "type": "array", + "items": { + "type": "string" + } + }, + "market_fee": { + "type": "number" + }, + "created_at_block": { + "type": "string" + }, + "created_at_time": { + "type": "string" + } + } } } }, - "Schema": { - "$ref": "Inlined10c0cac" - }, - "Inline8a79a343": { + "Template": { "type": "object", "properties": { "contract": { @@ -8283,7 +10595,7 @@ "type": "boolean" }, "immutable_data": { - "$ref": "Inlinecdb728a8" + "type": "object" }, "created_at_time": { "type": "string" @@ -8292,17 +10604,74 @@ "type": "string" }, "scheme": { - "$ref": "Inline15733e28" + "type": "object", + "properties": { + "schema_name": { + "type": "string" + }, + "format": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + }, + "created_at_block": { + "type": "string" + }, + "created_at_time": { + "type": "string" + } + } }, "collection": { - "$ref": "Inline3bac70d7" + "type": "object", + "properties": { + "collection_name": { + "type": "string" + }, + "name": { + "type": "string" + }, + "author": { + "type": "string" + }, + "allow_notify": { + "type": "boolean" + }, + "authorized_accounts": { + "type": "array", + "items": { + "type": "string" + } + }, + "notify_accounts": { + "type": "array", + "items": { + "type": "string" + } + }, + "market_fee": { + "type": "number" + }, + "created_at_block": { + "type": "string" + }, + "created_at_time": { + "type": "string" + } + } } } }, - "Template": { - "$ref": "Inline8a79a343" - }, - "Inlinebe0f0ae6": { + "Offer": { "type": "object", "properties": { "contract": { @@ -8332,13 +10701,13 @@ "sender_assets": { "type": "array", "items": { - "$ref": "Asset" + "$ref": "#/components/schemas/Asset" } }, "recipient_assets": { "type": "array", "items": { - "$ref": "Asset" + "$ref": "#/components/schemas/Asset" } }, "updated_at_block": { @@ -8355,10 +10724,7 @@ } } }, - "Offer": { - "$ref": "Inlinebe0f0ae6" - }, - "Inline18f76e5c": { + "Transfer": { "type": "object", "properties": { "contract": { @@ -8379,7 +10745,7 @@ "assets": { "type": "array", "items": { - "$ref": "Asset" + "$ref": "#/components/schemas/Asset" } }, "created_at_block": { @@ -8390,78 +10756,7 @@ } } }, - "Transfer": { - "$ref": "Inline18f76e5c" - }, - "Inlinefe4eed04": { - "type": "object", - "properties": { - "market_contract": { - "type": "string" - }, - "sale_id": { - "type": "string" - } - } - }, - "Inline36fc3608": { - "type": "object", - "properties": { - "market_contract": { - "type": "string" - }, - "auction_id": { - "type": "string" - } - } - }, - "Inline23df41a0": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_symbol": { - "type": "string" - } - } - }, - "Inline94a31c66": { - "type": "object", - "properties": { - "average": { - "type": "string" - }, - "market_contract": { - "type": "string" - }, - "max": { - "type": "string" - }, - "median": { - "type": "string" - }, - "min": { - "type": "string" - }, - "sales": { - "type": "string" - }, - "suggested_average": { - "type": "string" - }, - "suggested_median": { - "type": "string" - }, - "token": { - "$ref": "Inline23df41a0" - } - } - }, - "Inline226ace36": { + "ListingAsset": { "type": "object", "properties": { "contract": { @@ -8486,28 +10781,128 @@ "type": "string" }, "collection": { - "$ref": "Inline3bac70d7" + "type": "object", + "properties": { + "collection_name": { + "type": "string" + }, + "name": { + "type": "string" + }, + "author": { + "type": "string" + }, + "allow_notify": { + "type": "boolean" + }, + "authorized_accounts": { + "type": "array", + "items": { + "type": "string" + } + }, + "notify_accounts": { + "type": "array", + "items": { + "type": "string" + } + }, + "market_fee": { + "type": "number" + }, + "created_at_block": { + "type": "string" + }, + "created_at_time": { + "type": "string" + } + } }, "schema": { - "$ref": "Inline15733e28" + "type": "object", + "properties": { + "schema_name": { + "type": "string" + }, + "format": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + }, + "created_at_block": { + "type": "string" + }, + "created_at_time": { + "type": "string" + } + } }, "template": { - "$ref": "Inline6db6c0a2" + "type": "object", + "properties": { + "template_id": { + "type": "string" + }, + "max_supply": { + "type": "string" + }, + "issued_supply": { + "type": "string" + }, + "is_transferable": { + "type": "boolean" + }, + "is_burnable": { + "type": "boolean" + }, + "immutable_data": { + "type": "object" + }, + "created_at_time": { + "type": "string" + }, + "created_at_block": { + "type": "string" + } + } }, "backed_tokens": { "type": "array", "items": { - "$ref": "Inlinec529777e" + "type": "object", + "properties": { + "token_contract": { + "type": "string" + }, + "token_symbol": { + "type": "string" + }, + "token_precision": { + "type": "integer" + }, + "amount": { + "type": "string" + } + } } }, "immutable_data": { - "$ref": "Inlinecdb728a8" + "type": "object" }, "mutable_data": { - "$ref": "Inlinecdb728a8" + "type": "object" }, "data": { - "$ref": "Inlinecdb728a8" + "type": "object" }, "burned_by_account": { "type": "string" @@ -8539,27 +10934,80 @@ "sales": { "type": "array", "items": { - "$ref": "Inlinefe4eed04" + "type": "object", + "properties": { + "market_contract": { + "type": "string" + }, + "sale_id": { + "type": "string" + } + } } }, "auctions": { "type": "array", "items": { - "$ref": "Inline36fc3608" + "type": "object", + "properties": { + "market_contract": { + "type": "string" + }, + "auction_id": { + "type": "string" + } + } } }, "prices": { "type": "array", "items": { - "$ref": "Inline94a31c66" + "type": "object", + "properties": { + "average": { + "type": "string" + }, + "market_contract": { + "type": "string" + }, + "max": { + "type": "string" + }, + "median": { + "type": "string" + }, + "min": { + "type": "string" + }, + "sales": { + "type": "string" + }, + "suggested_average": { + "type": "string" + }, + "suggested_median": { + "type": "string" + }, + "token": { + "type": "object", + "properties": { + "token_contract": { + "type": "string" + }, + "token_precision": { + "type": "integer" + }, + "token_symbol": { + "type": "string" + } + } + } + } } } } }, - "ListingAsset": { - "$ref": "Inline226ace36" - }, - "Inlinebb1d5faf": { + "ListingOffer": { "type": "object", "properties": { "contract": { @@ -8589,13 +11037,13 @@ "sender_assets": { "type": "array", "items": { - "$ref": "ListingAsset" + "$ref": "#/components/schemas/ListingAsset" } }, "recipient_assets": { "type": "array", "items": { - "$ref": "ListingAsset" + "$ref": "#/components/schemas/ListingAsset" } }, "updated_at_block": { @@ -8612,10 +11060,7 @@ } } }, - "ListingOffer": { - "$ref": "Inlinebb1d5faf" - }, - "Inlinef7b99d3c": { + "ListingTransfer": { "type": "object", "properties": { "contract": { @@ -8636,7 +11081,7 @@ "assets": { "type": "array", "items": { - "$ref": "ListingAsset" + "$ref": "#/components/schemas/ListingAsset" } }, "created_at_block": { @@ -8647,27 +11092,7 @@ } } }, - "ListingTransfer": { - "$ref": "Inlinef7b99d3c" - }, - "Inlined616ecba": { - "type": "object", - "properties": { - "amount": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - } - } - }, - "Inline19815004": { + "Sale": { "type": "object", "properties": { "market_contract": { @@ -8689,7 +11114,21 @@ "type": "string" }, "price": { - "$ref": "Inlined616ecba" + "type": "object", + "properties": { + "amount": { + "type": "string" + }, + "token_precision": { + "type": "integer" + }, + "token_contract": { + "type": "string" + }, + "token_symbol": { + "type": "string" + } + } }, "listing_price": { "type": "number" @@ -8700,17 +11139,54 @@ "assets": { "type": "array", "items": { - "$ref": "Asset" + "$ref": "#/components/schemas/Asset" } }, "maker_marketplace": { - "type": "string" + "type": "string", + "nullable": true }, "taker_marketplace": { - "type": "string" + "type": "string", + "nullable": true }, "collection": { - "$ref": "Inline3bac70d7" + "type": "object", + "properties": { + "collection_name": { + "type": "string" + }, + "name": { + "type": "string" + }, + "author": { + "type": "string" + }, + "allow_notify": { + "type": "boolean" + }, + "authorized_accounts": { + "type": "array", + "items": { + "type": "string" + } + }, + "notify_accounts": { + "type": "array", + "items": { + "type": "string" + } + }, + "market_fee": { + "type": "number" + }, + "created_at_block": { + "type": "string" + }, + "created_at_time": { + "type": "string" + } + } }, "state": { "type": "integer" @@ -8729,33 +11205,7 @@ } } }, - "Sale": { - "$ref": "Inline19815004" - }, - "Inlinede464a22": { - "type": "object", - "properties": { - "number": { - "type": "integer" - }, - "account": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - }, - "txid": { - "type": "string" - } - } - }, - "Inline03fe463c": { + "Auction": { "type": "object", "properties": { "market_contract": { @@ -8771,31 +11221,103 @@ "type": "string" }, "buyer": { - "type": "string" + "type": "string", + "nullable": true }, "price": { - "$ref": "Inlined616ecba" + "type": "object", + "properties": { + "amount": { + "type": "string" + }, + "token_precision": { + "type": "integer" + }, + "token_contract": { + "type": "string" + }, + "token_symbol": { + "type": "string" + } + } }, "assets": { "type": "array", "items": { - "$ref": "Asset" + "$ref": "#/components/schemas/Asset" } }, "bids": { "type": "array", "items": { - "$ref": "Inlinede464a22" + "type": "object", + "properties": { + "number": { + "type": "integer" + }, + "account": { + "type": "string" + }, + "amount": { + "type": "string" + }, + "created_at_block": { + "type": "string" + }, + "created_at_time": { + "type": "string" + }, + "txid": { + "type": "string" + } + } } }, "maker_marketplace": { - "type": "string" + "type": "string", + "nullable": true }, "taker_marketplace": { - "type": "string" + "type": "string", + "nullable": true }, "collection": { - "$ref": "Inline3bac70d7" + "type": "object", + "properties": { + "collection_name": { + "type": "string" + }, + "name": { + "type": "string" + }, + "author": { + "type": "string" + }, + "allow_notify": { + "type": "boolean" + }, + "authorized_accounts": { + "type": "array", + "items": { + "type": "string" + } + }, + "notify_accounts": { + "type": "array", + "items": { + "type": "string" + } + }, + "market_fee": { + "type": "number" + }, + "created_at_block": { + "type": "string" + }, + "created_at_time": { + "type": "string" + } + } }, "state": { "type": "integer" @@ -8817,10 +11339,7 @@ } } }, - "Auction": { - "$ref": "Inline03fe463c" - }, - "Inlineecb350cd": { + "Buyoffer": { "type": "object", "properties": { "market_contract": { @@ -8839,22 +11358,73 @@ "type": "string" }, "price": { - "$ref": "Inlined616ecba" + "type": "object", + "properties": { + "amount": { + "type": "string" + }, + "token_precision": { + "type": "integer" + }, + "token_contract": { + "type": "string" + }, + "token_symbol": { + "type": "string" + } + } }, "assets": { "type": "array", "items": { - "$ref": "Asset" + "$ref": "#/components/schemas/Asset" } }, "maker_marketplace": { - "type": "string" + "type": "string", + "nullable": true }, "taker_marketplace": { - "type": "string" + "type": "string", + "nullable": true }, "collection": { - "$ref": "Inline3bac70d7" + "type": "object", + "properties": { + "collection_name": { + "type": "string" + }, + "name": { + "type": "string" + }, + "author": { + "type": "string" + }, + "allow_notify": { + "type": "boolean" + }, + "authorized_accounts": { + "type": "array", + "items": { + "type": "string" + } + }, + "notify_accounts": { + "type": "array", + "items": { + "type": "string" + } + }, + "market_fee": { + "type": "number" + }, + "created_at_block": { + "type": "string" + }, + "created_at_time": { + "type": "string" + } + } }, "state": { "type": "integer" @@ -8879,10 +11449,7 @@ } } }, - "Buyoffer": { - "$ref": "Inlineecb350cd" - }, - "Inline3b14cb7e": { + "Marketplace": { "type": "object", "properties": { "marketplace_name": { @@ -8899,10 +11466,7 @@ } } }, - "Marketplace": { - "$ref": "Inline3b14cb7e" - }, - "Inline91e35da1": { + "Link": { "type": "object", "properties": { "tools_contract": { @@ -8918,7 +11482,8 @@ "type": "string" }, "claimer": { - "type": "string" + "type": "string", + "nullable": true }, "state": { "type": "integer" @@ -8935,7 +11500,7 @@ "assets": { "type": "array", "items": { - "$ref": "Asset" + "$ref": "#/components/schemas/Asset" } }, "created_at_block": { @@ -8945,1417 +11510,7 @@ "type": "string" } } - }, - "Link": { - "$ref": "Inline91e35da1" - }, - "Inline7013859f": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Asset" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline2d859569": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "message": { - "type": "string" - } - } - }, - "Inline2ea55b59": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Asset" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline0470074c": { - "type": "object", - "properties": { - "template_mint": { - "type": "integer" - } - } - }, - "Inline20d1dd35": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Inline0470074c" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline3fd53df7": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Log" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inlinecae37d48": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Collection" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inlineb3b9967c": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Collection" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inlined904549d": { - "type": "object", - "properties": { - "assets": { - "type": "string" - }, - "burned": { - "type": "string" - }, - "templates": { - "type": "string" - }, - "schemas": { - "type": "string" - } - } - }, - "Inline28cb2593": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Inlined904549d" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline2734e4b8": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Schema" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inlinea2fe30b0": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Schema" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline7cd1878a": { - "type": "object", - "properties": { - "assets": { - "type": "string" - }, - "burned": { - "type": "string" - }, - "templates": { - "type": "string" - } - } - }, - "Inline1b899a72": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Inline7cd1878a" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline1a1c0c3e": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Template" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inlined7b3950c": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Template" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inlinea46e885b": { - "type": "object", - "properties": { - "assets": { - "type": "string" - }, - "burned": { - "type": "string" - } - } - }, - "Inlineacc80e6b": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Inlinea46e885b" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline636db0a6": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Offer" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inlinec16cb6b4": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Offer" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline311842ae": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Transfer" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline572de374": { - "type": "object", - "properties": { - "account": { - "type": "string" - }, - "assets": { - "type": "string" - } - } - }, - "Inlineffeae89e": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Inline572de374" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline7d95412b": { - "type": "object", - "properties": { - "collection": { - "$ref": "Collection" - }, - "assets": { - "type": "string" - } - } - }, - "Inlinef28c82d8": { - "type": "object", - "properties": { - "template_id": { - "type": "string" - }, - "assets": { - "type": "string" - } - } - }, - "Inlined4f425ef": { - "type": "object", - "properties": { - "collections": { - "type": "array", - "items": { - "$ref": "Inline7d95412b" - } - }, - "templates": { - "type": "array", - "items": { - "$ref": "Inlinef28c82d8" - } - }, - "assets": { - "type": "string" - } - } - }, - "Inlineb948cb9b": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Inlined4f425ef" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline53cc4aa2": { - "type": "object", - "properties": { - "schema_name": { - "type": "string" - }, - "assets": { - "type": "string" - } - } - }, - "Inline3e1ff881": { - "type": "object", - "properties": { - "templates": { - "type": "array", - "items": { - "$ref": "Inlinef28c82d8" - } - }, - "schemas": { - "type": "array", - "items": { - "$ref": "Inline53cc4aa2" - } - } - } - }, - "Inline87e7e216": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Inline3e1ff881" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inlinec1376055": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "assets": { - "type": "string" - } - } - }, - "Inline0d5dcbd2": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "template_id": { - "type": "string" - }, - "assets": { - "type": "string" - } - } - }, - "Inline0e0b9d0f": { - "type": "object", - "properties": { - "collections": { - "type": "array", - "items": { - "$ref": "Inlinec1376055" - } - }, - "templates": { - "type": "array", - "items": { - "$ref": "Inline0d5dcbd2" - } - }, - "assets": { - "type": "string" - } - } - }, - "Inlined52801ac": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Inline0e0b9d0f" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inlinee2ad32b6": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - } - } - }, - "Inlinecdcf7265": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "version": { - "type": "string" - }, - "collection_format": { - "type": "array", - "items": { - "$ref": "Inlineffffa488" - } - }, - "supported_tokens": { - "type": "array", - "items": { - "$ref": "Inlinee2ad32b6" - } - } - } - }, - "Inline1124b387": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Inlinecdcf7265" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline563c4072": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Sale" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline4a0559e2": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Sale" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline5d957a23": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Auction" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline07db2bcf": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Auction" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline004e82a0": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Buyoffer" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline0841b879": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Buyoffer" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline14ab017b": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Marketplace" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline0dbc05c9": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Marketplace" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inlinee1ca78cf": { - "type": "object", - "properties": { - "sale_id": { - "type": "string" - }, - "auction_id": { - "type": "string" - }, - "buyoffer_id": { - "type": "string" - }, - "price": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "seller": { - "type": "string" - }, - "buyer": { - "type": "string" - }, - "block_time": { - "type": "string" - } - } - }, - "Inlineb2e6fd35": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Inlinee1ca78cf" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline5cef590b": { - "type": "object", - "properties": { - "sale_id": { - "type": "string" - }, - "auction_id": { - "type": "string" - }, - "buyoffer_id": { - "type": "string" - }, - "template_mint": { - "type": "string" - }, - "price": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "block_time": { - "type": "string" - } - } - }, - "Inline85a8820c": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Inline5cef590b" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline4f49e15b": { - "type": "object", - "properties": { - "average": { - "type": "string" - }, - "median": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "time": { - "type": "string" - } - } - }, - "Inline6d90dcea": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Inline4f49e15b" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline3eff563c": { - "type": "object", - "properties": { - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "collection_name": { - "type": "string" - }, - "template_id": { - "type": "string" - }, - "average": { - "type": "string" - }, - "median": { - "type": "string" - }, - "suggested_average": { - "type": "string" - }, - "suggested_median": { - "type": "string" - }, - "min": { - "type": "string" - }, - "max": { - "type": "string" - } - } - }, - "Inline74cdda32": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Inline3eff563c" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline63cc0ead": { - "type": "object", - "properties": { - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "median": { - "type": "string" - }, - "average": { - "type": "string" - }, - "suggested_average": { - "type": "string" - }, - "suggested_median": { - "type": "string" - }, - "min": { - "type": "string" - }, - "max": { - "type": "string" - } - } - }, - "Inline4eea33ed": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Inline63cc0ead" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inlineb4c46f55": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "market_fee": { - "type": "number" - }, - "data": { - "$ref": "Inlinecdb728a8" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - }, - "listings": { - "type": "string" - }, - "volume": { - "type": "string" - }, - "sales": { - "type": "string" - } - } - }, - "Inline75f876f2": { - "type": "object", - "properties": { - "symbol": { - "$ref": "Inlinee2ad32b6" - }, - "results": { - "type": "array", - "items": { - "$ref": "Inlineb4c46f55" - } - } - } - }, - "Inlinecbc952ff": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Inline75f876f2" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline021b56c6": { - "type": "object", - "properties": { - "account": { - "type": "string" - }, - "buy_volume": { - "type": "string" - }, - "sell_volume": { - "type": "string" - } - } - }, - "Inline3a0d77f8": { - "type": "object", - "properties": { - "symbol": { - "$ref": "Inlinee2ad32b6" - }, - "results": { - "type": "array", - "items": { - "$ref": "Inline021b56c6" - } - } - } - }, - "Inline37285df6": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Inline3a0d77f8" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inlineb32e2720": { - "type": "object", - "properties": { - "symbol": { - "$ref": "Inlinee2ad32b6" - }, - "result": { - "type": "array", - "items": { - "$ref": "Inline021b56c6" - } - } - } - }, - "Inline3e1988f8": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Inlineb32e2720" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline46a855d8": { - "type": "object", - "properties": { - "schema_name": { - "type": "string" - }, - "listings": { - "type": "string" - }, - "volume": { - "type": "string" - } - } - }, - "Inline2d1fd46a": { - "type": "object", - "properties": { - "symbol": { - "$ref": "Inlinee2ad32b6" - }, - "results": { - "type": "array", - "items": { - "$ref": "Inline46a855d8" - } - } - } - }, - "Inline01d71b58": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Inline2d1fd46a" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline472eb4f5": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "volume": { - "type": "string" - }, - "sales": { - "type": "string" - } - } - }, - "Inlinecdfded9b": { - "type": "object", - "properties": { - "symbol": { - "$ref": "Inlinee2ad32b6" - }, - "results": { - "type": "array", - "items": { - "$ref": "Inline472eb4f5" - } - } - } - }, - "Inline03ec62d9": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Inlinecdfded9b" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline37541c3f": { - "type": "object", - "properties": { - "volume": { - "type": "string" - }, - "sales": { - "type": "string" - } - } - }, - "Inlined7926285": { - "type": "object", - "properties": { - "symbol": { - "$ref": "Inlinee2ad32b6" - }, - "results": { - "$ref": "Inline37541c3f" - } - } - }, - "Inlinee9e8d085": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Inlined7926285" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inlineedc1f8ec": { - "type": "object", - "properties": { - "listing_symbol": { - "type": "string" - }, - "settlement_symbol": { - "type": "string" - }, - "delphi_pair_name": { - "type": "string" - }, - "invert_delphi_pair": { - "type": "boolean" - } - } - }, - "Inlineeecf236e": { - "type": "object", - "properties": { - "atomicassets_contract": { - "type": "string" - }, - "atomicmarket_contract": { - "type": "string" - }, - "delphioracle_contract": { - "type": "string" - }, - "version": { - "type": "string" - }, - "maker_market_fee": { - "type": "number" - }, - "taker_market_fee": { - "type": "number" - }, - "minimum_auction_duration": { - "type": "integer" - }, - "maximum_auction_duration": { - "type": "integer" - }, - "minimum_bid_increase": { - "type": "number" - }, - "auction_reset_duration": { - "type": "integer" - }, - "supported_tokens": { - "type": "array", - "items": { - "$ref": "Inlinee2ad32b6" - } - }, - "supported_pairs": { - "type": "array", - "items": { - "$ref": "Inlineedc1f8ec" - } - } - } - }, - "Inline4f499623": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Inlineeecf236e" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline96783c6c": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "undefined" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline359f6138": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "ListingAsset" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline382d5749": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "ListingTransfer" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline789aa161": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "ListingOffer" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline2c904cf9": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "ListingOffer" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inlinedb18d4ba": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Link" - } - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline3a3cb959": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Link" - }, - "query_time": { - "type": "integer" - } - } - }, - "Inline59b668ab": { - "type": "object", - "properties": { - "atomictools_contract": { - "type": "string" - }, - "atomicassets_contract": { - "type": "string" - }, - "version": { - "type": "string" - } - } - }, - "Inline7a0424ea": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Inline59b668ab" - }, - "query_time": { - "type": "integer" - } - } } } } -} \ No newline at end of file +} From 290c83ce2f4e0fb00c057aa83c3778036703a707 Mon Sep 17 00:00:00 2001 From: Christoph Kappestein Date: Wed, 9 Oct 2024 22:30:58 +0200 Subject: [PATCH 4/6] improve generator test --- tests/Generator/GeneratorTestCase.php | 86 +++++++++++++-------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/tests/Generator/GeneratorTestCase.php b/tests/Generator/GeneratorTestCase.php index 61e2d991..a4a837cb 100644 --- a/tests/Generator/GeneratorTestCase.php +++ b/tests/Generator/GeneratorTestCase.php @@ -58,7 +58,7 @@ protected function getSpecification(): SpecificationInterface $delete = $this->addSchema($builder, Schema\Delete::class); $patch = $this->addSchema($builder, Schema\Patch::class); - $operation = $builder->addOperation('get', 'GET', '/foo/:name/:type', 200, PropertyTypeFactory::getReference($collection)); + $operation = $builder->addOperation('get', 'GET', '/foo/:name/:type', 200, $collection); $operation->setDescription('Returns a collection'); $operation->addArgument('name', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString() ->setDescription('Name parameter')); @@ -73,31 +73,31 @@ protected function getSpecification(): SpecificationInterface ->setFormat(Format::DATETIME)); $operation->addArgument('args', ArgumentInterface::IN_QUERY, PropertyTypeFactory::getReference('Entry')); - $operation = $builder->addOperation('create', 'POST', '/foo/:name/:type', 201, PropertyTypeFactory::getReference($message)); + $operation = $builder->addOperation('create', 'POST', '/foo/:name/:type', 201, $message); $operation->addArgument('name', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString()); $operation->addArgument('type', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString()); - $operation->addArgument('payload', ArgumentInterface::IN_BODY, PropertyTypeFactory::getReference($create)); - $operation->addThrow(400, PropertyTypeFactory::getReference($message)); - $operation->addThrow(500, PropertyTypeFactory::getReference($message)); + $operation->addArgument('payload', ArgumentInterface::IN_BODY, $create); + $operation->addThrow(400, $message); + $operation->addThrow(500, $message); - $operation = $builder->addOperation('update', 'PUT', '/foo/:name/:type', 200, PropertyTypeFactory::getMap(PropertyTypeFactory::getReference($message))); + $operation = $builder->addOperation('update', 'PUT', '/foo/:name/:type', 200, PropertyTypeFactory::getMap($message)); $operation->addArgument('name', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString()); $operation->addArgument('type', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString()); - $operation->addArgument('payload', ArgumentInterface::IN_BODY, PropertyTypeFactory::getMap(PropertyTypeFactory::getReference($update))); - $operation->addThrow(400, PropertyTypeFactory::getReference($message)); - $operation->addThrow(500, PropertyTypeFactory::getMap(PropertyTypeFactory::getReference($message))); + $operation->addArgument('payload', ArgumentInterface::IN_BODY, PropertyTypeFactory::getMap($update)); + $operation->addThrow(400, $message); + $operation->addThrow(500, PropertyTypeFactory::getMap($message)); - $operation = $builder->addOperation('delete', 'DELETE', '/foo/:name/:type', 204, PropertyTypeFactory::getReference($message)); + $operation = $builder->addOperation('delete', 'DELETE', '/foo/:name/:type', 204, $message); $operation->addArgument('name', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString()); $operation->addArgument('type', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString()); - $operation->addArgument('payload', ArgumentInterface::IN_BODY, PropertyTypeFactory::getReference($delete)); + $operation->addArgument('payload', ArgumentInterface::IN_BODY, $delete); - $operation = $builder->addOperation('patch', 'PATCH', '/foo/:name/:type', 200, PropertyTypeFactory::getArray(PropertyTypeFactory::getReference($message))); + $operation = $builder->addOperation('patch', 'PATCH', '/foo/:name/:type', 200, PropertyTypeFactory::getArray($message)); $operation->addArgument('name', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString()); $operation->addArgument('type', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString()); - $operation->addArgument('payload', ArgumentInterface::IN_BODY, PropertyTypeFactory::getArray(PropertyTypeFactory::getReference($patch))); - $operation->addThrow(400, PropertyTypeFactory::getReference($message)); - $operation->addThrow(500, PropertyTypeFactory::getArray(PropertyTypeFactory::getReference($message))); + $operation->addArgument('payload', ArgumentInterface::IN_BODY, PropertyTypeFactory::getArray($patch)); + $operation->addThrow(400, $message); + $operation->addThrow(500, PropertyTypeFactory::getArray($message)); return $builder->getSpecification(); } @@ -111,33 +111,33 @@ protected function getSpecificationCollection(): SpecificationInterface $message = $this->addSchema($builder, Schema\Message::class); $create = $this->addSchema($builder, Schema\Create::class); - $operation = $builder->addOperation('foo.bar.get', 'GET', '/foo', 200, PropertyTypeFactory::getReference($collection)); + $operation = $builder->addOperation('foo.bar.get', 'GET', '/foo', 200, $collection); $operation->setDescription('Returns a collection'); $operation->setTags(['foo']); - $operation = $builder->addOperation('foo.bar.create', 'POST', '/foo', 201, PropertyTypeFactory::getReference($message)); + $operation = $builder->addOperation('foo.bar.create', 'POST', '/foo', 201, $message); $operation->setTags(['foo']); - $operation->addArgument('payload', 'body', PropertyTypeFactory::getReference($create)); - $operation->addThrow(400, PropertyTypeFactory::getReference($message)); - $operation->addThrow(500, PropertyTypeFactory::getReference($message)); + $operation->addArgument('payload', 'body', $create); + $operation->addThrow(400, $message); + $operation->addThrow(500, $message); - $operation = $builder->addOperation('bar.find', 'GET', '/bar/:foo', 200, PropertyTypeFactory::getReference($collection)); + $operation = $builder->addOperation('bar.find', 'GET', '/bar/:foo', 200, $collection); $operation->setDescription('Returns a collection'); $operation->setTags(['bar']); $operation->addArgument('foo', 'path', PropertyTypeFactory::getString()); - $operation = $builder->addOperation('bar.put', 'POST', '/bar/:foo', 201, PropertyTypeFactory::getReference($message)); + $operation = $builder->addOperation('bar.put', 'POST', '/bar/:foo', 201, $message); $operation->setTags(['bar']); - $operation->addArgument('payload', 'body', PropertyTypeFactory::getReference($create)); + $operation->addArgument('payload', 'body', $create); - $operation = $builder->addOperation('foo.baz.get', 'GET', '/bar/$year<[0-9]+>', 200, PropertyTypeFactory::getReference($collection)); + $operation = $builder->addOperation('foo.baz.get', 'GET', '/bar/$year<[0-9]+>', 200, $collection); $operation->setDescription('Returns a collection'); $operation->setTags(['baz']); $operation->addArgument('year', 'path', PropertyTypeFactory::getString()); - $operation = $builder->addOperation('foo.baz.create', 'POST', '/bar/$year<[0-9]+>', 201, PropertyTypeFactory::getReference($message)); + $operation = $builder->addOperation('foo.baz.create', 'POST', '/bar/$year<[0-9]+>', 201, $message); $operation->setTags(['baz']); - $operation->addArgument('payload', 'body', PropertyTypeFactory::getReference($create)); + $operation->addArgument('payload', 'body', $create); return $builder->getSpecification(); } @@ -150,57 +150,57 @@ protected function getSpecificationTest(): SpecificationInterface $testRequest = $this->addSchema($builder, Schema\TestRequest::class); $testResponse = $this->addSchema($builder, Schema\TestResponse::class); - $operation = $builder->addOperation('product.getAll', 'GET', '/anything', 200, PropertyTypeFactory::getReference($testResponse)); + $operation = $builder->addOperation('product.getAll', 'GET', '/anything', 200, $testResponse); $operation->setDescription('Returns a collection'); $operation->addArgument('startIndex', 'query', PropertyTypeFactory::getInteger()); $operation->addArgument('count', 'query', PropertyTypeFactory::getInteger()); $operation->addArgument('search', 'query', PropertyTypeFactory::getString()); - $operation = $builder->addOperation('product.create', 'POST', '/anything', 200, PropertyTypeFactory::getReference($testResponse)); + $operation = $builder->addOperation('product.create', 'POST', '/anything', 200, $testResponse); $operation->setDescription('Creates a new product'); - $operation->addArgument('payload', 'body', PropertyTypeFactory::getReference($testRequest)); - $operation->addThrow(500, PropertyTypeFactory::getReference($testResponse)); + $operation->addArgument('payload', 'body', $testRequest); + $operation->addThrow(500, $testResponse); - $operation = $builder->addOperation('product.update', 'PUT', '/anything/:id', 200, PropertyTypeFactory::getReference($testResponse)); + $operation = $builder->addOperation('product.update', 'PUT', '/anything/:id', 200, $testResponse); $operation->setDescription('Updates an existing product'); $operation->addArgument('id', 'path', PropertyTypeFactory::getInteger()); - $operation->addArgument('payload', 'body', PropertyTypeFactory::getReference($testRequest)); + $operation->addArgument('payload', 'body', $testRequest); - $operation = $builder->addOperation('product.patch', 'PATCH', '/anything/:id', 200, PropertyTypeFactory::getReference($testResponse)); + $operation = $builder->addOperation('product.patch', 'PATCH', '/anything/:id', 200, $testResponse); $operation->setDescription('Patches an existing product'); $operation->addArgument('id', 'path', PropertyTypeFactory::getInteger()); - $operation->addArgument('payload', 'body', PropertyTypeFactory::getReference($testRequest)); + $operation->addArgument('payload', 'body', $testRequest); - $operation = $builder->addOperation('product.delete', 'DELETE', '/anything/:id', 200, PropertyTypeFactory::getReference($testResponse)); + $operation = $builder->addOperation('product.delete', 'DELETE', '/anything/:id', 200, $testResponse); $operation->setDescription('Deletes an existing product'); $operation->addArgument('id', 'path', PropertyTypeFactory::getInteger()); - $operation = $builder->addOperation('product.binary', 'POST', '/anything/binary', 200, PropertyTypeFactory::getReference($testResponse)); + $operation = $builder->addOperation('product.binary', 'POST', '/anything/binary', 200, $testResponse); $operation->setDescription('Test binary content type'); $operation->addArgument('payload', 'body', new ContentType(ContentType::BINARY)); $operation->addThrow(500, new ContentType(ContentType::BINARY)); - $operation = $builder->addOperation('product.form', 'POST', '/anything/form', 200, PropertyTypeFactory::getReference($testResponse)); + $operation = $builder->addOperation('product.form', 'POST', '/anything/form', 200, $testResponse); $operation->setDescription('Test form content type'); $operation->addArgument('payload', 'body', new ContentType(ContentType::FORM)); $operation->addThrow(500, new ContentType(ContentType::FORM)); - $operation = $builder->addOperation('product.json', 'POST', '/anything/json', 200, PropertyTypeFactory::getReference($testResponse)); + $operation = $builder->addOperation('product.json', 'POST', '/anything/json', 200, $testResponse); $operation->setDescription('Test json content type'); $operation->addArgument('payload', 'body', new ContentType(ContentType::JSON)); $operation->addThrow(500, new ContentType(ContentType::JSON)); - $operation = $builder->addOperation('product.multipart', 'POST', '/anything/multipart', 200, PropertyTypeFactory::getReference($testResponse)); + $operation = $builder->addOperation('product.multipart', 'POST', '/anything/multipart', 200, $testResponse); $operation->setDescription('Test json content type'); $operation->addArgument('payload', 'body', new ContentType(ContentType::MULTIPART)); $operation->addThrow(500, new ContentType(ContentType::MULTIPART)); - $operation = $builder->addOperation('product.text', 'POST', '/anything/text', 200, PropertyTypeFactory::getReference($testResponse)); + $operation = $builder->addOperation('product.text', 'POST', '/anything/text', 200, $testResponse); $operation->setDescription('Test text content type'); $operation->addArgument('payload', 'body', new ContentType(ContentType::TEXT)); $operation->addThrow(500, new ContentType(ContentType::TEXT)); - $operation = $builder->addOperation('product.xml', 'POST', '/anything/xml', 200, PropertyTypeFactory::getReference($testResponse)); + $operation = $builder->addOperation('product.xml', 'POST', '/anything/xml', 200, $testResponse); $operation->setDescription('Test xml content type'); $operation->addArgument('payload', 'body', new ContentType(ContentType::XML)); $operation->addThrow(500, new ContentType(ContentType::XML)); @@ -265,10 +265,10 @@ protected function writeChunksToFolder(Chunks $result, string $target): void iterator_to_array($result->writeToFolder($target)); } - private function addSchema(SpecificationBuilderInterface $builder, string $schema): string + private function addSchema(SpecificationBuilderInterface $builder, string $schema): ReferencePropertyType { $result = $this->schemaManager->getSchema($schema); $builder->addDefinitions($result->getDefinitions()); - return $result->getRoot(); + return PropertyTypeFactory::getReference($result->getRoot()); } } From 1e779a227d6388b38038a9a89464815cd351c07f Mon Sep 17 00:00:00 2001 From: Christoph Kappestein Date: Wed, 9 Oct 2024 23:30:07 +0200 Subject: [PATCH 5/6] fix test --- src/Parser/OpenAPI.php | 18 +- src/Transformer/OpenAPI.php | 27 +- tests/Transformer/OpenAPITest.php | 1 + .../openapi/actual/00_openapi.json | 11595 +--------------- .../openapi/expect/00_openapi.json | 11566 +-------------- 5 files changed, 279 insertions(+), 22928 deletions(-) diff --git a/src/Parser/OpenAPI.php b/src/Parser/OpenAPI.php index ec7d189b..945d8ecb 100644 --- a/src/Parser/OpenAPI.php +++ b/src/Parser/OpenAPI.php @@ -61,19 +61,10 @@ use PSX\Schema\SchemaInterface; use PSX\Schema\SchemaManagerInterface; use PSX\Schema\SchemaTraverser; -use PSX\Schema\Type\ArrayType; -use PSX\Schema\Type\ArrayTypeInterface; use PSX\Schema\Type\DefinitionTypeAbstract; use PSX\Schema\Type\Factory\PropertyTypeFactory; -use PSX\Schema\Type\IntersectionType; -use PSX\Schema\Type\MapType; -use PSX\Schema\Type\MapTypeInterface; use PSX\Schema\Type\PropertyTypeAbstract; use PSX\Schema\Type\ReferencePropertyType; -use PSX\Schema\Type\ReferenceType; -use PSX\Schema\Type\StructDefinitionType; -use PSX\Schema\Type\StructType; -use PSX\Schema\Type\UnionType; use PSX\Schema\TypeFactory; use PSX\Schema\TypeInterface; use PSX\Schema\Visitor\TypeVisitor; @@ -283,7 +274,7 @@ private function parseParameters(string $type, array $data): Arguments [$name, $property, $isRequired] = $this->parseParameter($type, $definition); if ($name !== null) { - if ($property instanceof TypeInterface) { + if ($property instanceof PropertyTypeAbstract) { $return->add($name, new Argument($type, $property, $name)); } } @@ -316,9 +307,6 @@ private function parseParameter(string $in, Parameter|Reference $data): array $schema = $data->getSchema(); if ($schema instanceof \stdClass) { $type = $this->schemaParser->parsePropertyType($schema); - if ($type instanceof ReferencePropertyType) { - $type = $this->definitions->getType($type->getTarget()); - } } } @@ -412,7 +400,9 @@ private function transformInlineStruct(DefinitionTypeAbstract $type): PropertyTy // we have an inline struct type we automatically add this ot the definitions, since we have no name we generate // it based on the type, this should motivate users to move the definition to the components section $typeName = 'Inline' . substr($this->hashInspector->generateByType($type), 0, 8); - $this->definitions->addType($typeName, $type); + if (!$this->definitions->hasType($typeName)) { + $this->definitions->addType($typeName, $type); + } return PropertyTypeFactory::getReference($typeName); } diff --git a/src/Transformer/OpenAPI.php b/src/Transformer/OpenAPI.php index d78f62f1..f9088f92 100644 --- a/src/Transformer/OpenAPI.php +++ b/src/Transformer/OpenAPI.php @@ -63,6 +63,10 @@ private function transformOperations(\stdClass $spec): void } foreach ($methods as $operation) { + if (!$operation instanceof \stdClass) { + continue; + } + $this->transformOperation($operation, $spec); } } @@ -75,12 +79,27 @@ public function transformOperation(\stdClass $operation, \stdClass $spec): void foreach ($responses as $statusCode => $response) { $schema = $response->content->{'application/json'}->schema ?? null; if ($schema instanceof \stdClass) { - $result = $this->transformer->transform($schema); + $ref = $schema->{'$ref'} ?? null; + if (!empty($ref)) { + $ref = str_replace('#/definitions/', '', $ref); + $ref = str_replace('#/$defs/', '', $ref); + $ref = str_replace('#/components/schemas/', '', $ref); + + $response->content->{'application/json'}->schema = [ + 'type' => 'reference', + 'target' => $ref, + ]; + } else { + $result = $this->transformer->transform($schema); - $response->content->{'application/json'}->schema = ['$ref' => $result->{'root'}]; + $response->content->{'application/json'}->schema = [ + 'type' => 'reference', + 'target' => $result->{'root'}, + ]; - foreach ($result->definitions as $name => $type) { - $spec->components->schemas->{$name} = $type; + foreach ($result->definitions as $name => $type) { + $spec->components->schemas->{$name} = $type; + } } } } diff --git a/tests/Transformer/OpenAPITest.php b/tests/Transformer/OpenAPITest.php index 137d49c9..ee3cbac6 100644 --- a/tests/Transformer/OpenAPITest.php +++ b/tests/Transformer/OpenAPITest.php @@ -25,6 +25,7 @@ use PSX\Api\Parser\Attribute\Builder; use PSX\Api\SpecificationInterface; use PSX\Api\Transformer\OpenAPI; +use PSX\Schema\ObjectMapper; use PSX\Schema\SchemaManager; use Symfony\Component\Cache\Adapter\ArrayAdapter; use Symfony\Component\Yaml\Yaml; diff --git a/tests/Transformer/openapi/actual/00_openapi.json b/tests/Transformer/openapi/actual/00_openapi.json index 77f53b59..27156a2e 100644 --- a/tests/Transformer/openapi/actual/00_openapi.json +++ b/tests/Transformer/openapi/actual/00_openapi.json @@ -1,11512 +1,185 @@ { - "openapi": "3.0.3", + "openapi": "3.0.0", "info": { - "description": "### EOSIO Contract API\n*Made with ♥️ by [pink.gg](https://pink.gg/)*\n#### Current Chain: wax-mainnet\n#### Provided by: [Zeptagram](https://zeptagram.com)", - "version": "1.2.12", - "title": "EOSIO Contract API" - }, - "servers": [ - { - "url": "https://wmnft.zeptagram.com" - }, - { - "url": "http://wmnft.zeptagram.com" - } - ], - "tags": [ - { - "name": "assets", - "description": "Assets" - }, - { - "name": "assets", - "description": "Assets" - }, - { - "name": "collections", - "description": "Collections" - }, - { - "name": "schemas", - "description": "Schemas" - }, - { - "name": "templates", - "description": "Templates" - }, - { - "name": "offers", - "description": "Offers" - }, - { - "name": "transfers", - "description": "Transfers" - }, - { - "name": "accounts", - "description": "Accounts" - }, - { - "name": "burns", - "description": "Burns" - }, - { - "name": "config", - "description": "Config" - }, - { - "name": "sales", - "description": "Sales" - }, - { - "name": "auctions", - "description": "Auctions" - }, - { - "name": "buyoffers", - "description": "Buyoffers" - }, - { - "name": "marketplaces", - "description": "Marketplaces" - }, - { - "name": "pricing", - "description": "Pricing" - }, - { - "name": "stats", - "description": "Stats" - }, - { - "name": "config", - "description": "Config" - }, - { - "name": "assets", - "description": "Assets" - }, - { - "name": "assets", - "description": "Assets" - }, - { - "name": "transfers", - "description": "Transfers" - }, - { - "name": "offers", - "description": "Offers" - }, - { - "name": "links", - "description": "Share Links" - }, - { - "name": "config", - "description": "Config" - } - ], - "paths": { - "/atomicassets/v1/assets": { - "get": { - "tags": [ - "assets" - ], - "summary": "Fetch assets.", - "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", - "parameters": [ - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "owner", - "in": "query", - "description": "Filter by owner", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter by burned", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for input in asset name on template data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_immutable_name", - "in": "query", - "description": "Search for input in asset name on asset immutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_mutable_name", - "in": "query", - "description": "Search for input in asset name on asset mutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Check if asset is transferable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Check if asset is burnable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "only_duplicate_templates", - "in": "query", - "description": "Show only duplicate assets grouped by template", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "has_backed_tokens", - "in": "query", - "description": "Show only assets that are backed by a token", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "authorized_account", - "in": "query", - "description": "Filter for assets the provided account can edit. ", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_whitelist", - "in": "query", - "description": "Filter for multiple template ids split by \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_blacklist", - "in": "query", - "description": "Dont include specific template ids split by \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_templates_by_accounts", - "in": "query", - "description": "Dont templates that are owned by an account", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_offers", - "in": "query", - "description": "Hide assets which are used in an offer", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asset_id", - "minted", - "updated", - "transferred", - "template_mint", - "name" - ], - "default": "asset_id" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/assets/{asset_id}": { - "get": { - "tags": [ - "assets" - ], - "summary": "Fetch asset by id", - "parameters": [ - { - "name": "asset_id", - "in": "path", - "description": "ID of asset", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Asset" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/assets/{asset_id}/stats": { - "get": { - "tags": [ - "assets" - ], - "summary": "Fetch asset stats", - "parameters": [ - { - "name": "asset_id", - "in": "path", - "description": "ID of asset", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "template_mint": { - "type": "integer" - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/assets/{asset_id}/logs": { - "get": { - "tags": [ - "assets" - ], - "summary": "Fetch asset logs", - "parameters": [ - { - "name": "asset_id", - "in": "path", - "description": "ID of asset", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/collections": { - "get": { - "tags": [ - "collections" - ], - "summary": "Fetch collections", - "parameters": [ - { - "name": "author", - "in": "query", - "description": "Get collections by author", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for input in collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "authorized_account", - "in": "query", - "description": "Filter for collections which the provided account can use to create assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "notify_account", - "in": "query", - "description": "Filter for collections where the provided account is notified", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created", - "collection_name" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Collection" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/collections/{collection_name}": { - "get": { - "tags": [ - "collections" - ], - "summary": "Find collection by its name", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Name of collection", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Collection" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/collections/{collection_name}/stats": { - "get": { - "tags": [ - "collections" - ], - "summary": "Get stats about collection", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Name of collection", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "assets": { - "type": "string" - }, - "burned": { - "type": "string" - }, - "templates": { - "type": "string" - }, - "schemas": { - "type": "string" - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/collections/{collection_name}/logs": { - "get": { - "tags": [ - "collections" - ], - "summary": "Fetch collection logs", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Name of collection", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/schemas": { - "get": { - "tags": [ - "schemas" - ], - "summary": "Fetch schemas", - "parameters": [ - { - "name": "collection_name", - "in": "query", - "description": "Get all schemas within the collection", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "authorized_account", - "in": "query", - "description": "Filter for schemas the provided account can edit", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for input in schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created", - "schema_name" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Schema" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/schemas/{collection_name}/{schema_name}": { - "get": { - "tags": [ - "schemas" - ], - "summary": "Find schema by schema_name", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Collection name of schema", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "path", - "description": "Name of schema", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Schema" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/schemas/{collection_name}/{schema_name}/stats": { - "get": { - "tags": [ - "schemas" - ], - "summary": "Get stats about a specific schema", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Collection name of schema", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "path", - "description": "Name of schema", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "assets": { - "type": "string" - }, - "burned": { - "type": "string" - }, - "templates": { - "type": "string" - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/schemas/{collection_name}/{schema_name}/logs": { - "get": { - "tags": [ - "schemas" - ], - "summary": "Fetch schema logs", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Collection name of schema", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "path", - "description": "Name of schema", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/templates": { - "get": { - "tags": [ - "templates" - ], - "summary": "Fetch templates.", - "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", - "parameters": [ - { - "name": "collection_name", - "in": "query", - "description": "Get all templates within the collection", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Get all templates which implement that schema", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "issued_supply", - "in": "query", - "description": "Filter by issued supply", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "min_issued_supply", - "in": "query", - "description": "Filter by issued supply", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "max_issued_supply", - "in": "query", - "description": "Filter by issued supply", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "has_assets", - "in": "query", - "description": "Only show templates with existing supply > 0", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "max_supply", - "in": "query", - "description": "Filter by max supply", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter by burnable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter by transferable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "authorized_account", - "in": "query", - "description": "Filter for templates the provided account can use", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for template id or", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "name", - "created" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Template" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/templates/{collection_name}/{template_id}": { - "get": { - "tags": [ - "templates" - ], - "summary": "Find template by id", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Name of collection", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "path", - "description": "ID of template", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Template" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/templates/{collection_name}/{template_id}/stats": { - "get": { - "tags": [ - "templates" - ], - "summary": "Get stats about a specific template", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Name of collection", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "path", - "description": "ID of template", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "assets": { - "type": "string" - }, - "burned": { - "type": "string" - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/templates/{collection_name}/{template_id}/logs": { - "get": { - "tags": [ - "templates" - ], - "summary": "Fetch template logs", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Name of collection", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "path", - "description": "ID of template", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/offers": { - "get": { - "tags": [ - "offers" - ], - "summary": "Fetch offers", - "parameters": [ - { - "name": "account", - "in": "query", - "description": "Notified account (can be sender or recipient) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sender", - "in": "query", - "description": "Offer sender - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "recipient", - "in": "query", - "description": "Offer recipient - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "state", - "in": "query", - "description": "Filter by Offer State (0: PENDING - Offer created and valid, 1: INVALID - Assets are missing because ownership has changed, 2: UNKNOWN - Offer is not valid anymore, 3: ACCEPTED - Offer was accepted, 4: DECLINED - Offer was declined by recipient, 5: CANCELLED - Offer was canceled by sender) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "is_recipient_contract", - "in": "query", - "description": "Filter offers where recipient is a contract", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "asset_id", - "in": "query", - "description": "only offers which contain this asset_id - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "only offers which contain assets of this template - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "only offers which contain assets of this schema - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_name", - "in": "query", - "description": "only offers which contain assets of this collection - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "account_whitelist", - "in": "query", - "description": "Only offers which are sent by one of these accounts", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "account_blacklist", - "in": "query", - "description": "Exclude offers which are sent by one of these accounts", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sender_asset_whitelist", - "in": "query", - "description": "Only offers which contain these assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sender_asset_blacklist", - "in": "query", - "description": "Exclude offers which contain these assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "recipient_asset_whitelist", - "in": "query", - "description": "Only offers which contain these assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "recipient_asset_blacklist", - "in": "query", - "description": "Exclude offers which contain these assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_contracts", - "in": "query", - "description": "dont show offers from or to accounts that have code deployed", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created", - "updated" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Offer" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/offers/{offer_id}": { - "get": { - "tags": [ - "offers" - ], - "summary": "Find offer by id", - "parameters": [ - { - "name": "offer_id", - "in": "path", - "description": "ID of offer", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Offer" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/offers/{offer_id}/logs": { - "get": { - "tags": [ - "offers" - ], - "summary": "Fetch offer logs", - "parameters": [ - { - "name": "offer_id", - "in": "path", - "description": "ID of offer", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/transfers": { - "get": { - "tags": [ - "transfers" - ], - "summary": "Fetch transfers", - "parameters": [ - { - "name": "account", - "in": "query", - "description": "Notified account (can be sender or recipient) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sender", - "in": "query", - "description": "Transfer sender - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "recipient", - "in": "query", - "description": "Transfer recipient - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "asset_id", - "in": "query", - "description": "only transfers which contain this asset_id - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "only transfers which contain assets of this template - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "only transfers which contain assets of this schema - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_name", - "in": "query", - "description": "only transfers which contain assets of this collection - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_contracts", - "in": "query", - "description": "dont show transfers from or to accounts that have code deployed", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/accounts": { - "get": { - "tags": [ - "accounts" - ], - "summary": "Get accounts which own atomicassets NFTs", - "parameters": [ - { - "name": "match", - "in": "query", - "description": "Search for partial account name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_name", - "in": "query", - "description": "Filter for specific collection", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter for specific schema", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter for specific template", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_offers", - "in": "query", - "description": "Hide assets which are used in an offer", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "account": { - "type": "string" - }, - "assets": { - "type": "string" - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/accounts/{account}": { - "get": { - "tags": [ - "accounts" - ], - "summary": "Get a specific account", - "parameters": [ - { - "name": "account", - "in": "path", - "description": "Account name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "hide_offers", - "in": "query", - "description": "Hide assets which are used in an offer", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "collections": { - "type": "array", - "items": { - "type": "object", - "properties": { - "collection": { - "$ref": "#/components/schemas/Collection" - }, - "assets": { - "type": "string" - } - } - } - }, - "templates": { - "type": "array", - "items": { - "type": "object", - "properties": { - "template_id": { - "type": "string" - }, - "assets": { - "type": "string" - } - } - } - }, - "assets": { - "type": "string" - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/accounts/{account}/{collection_name}": { - "get": { - "tags": [ - "accounts" - ], - "summary": "Get templates and schemas count by account", - "parameters": [ - { - "name": "account", - "in": "path", - "description": "Account name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "collection_name", - "in": "path", - "description": "Collection Name", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "templates": { - "type": "array", - "items": { - "type": "object", - "properties": { - "template_id": { - "type": "string" - }, - "assets": { - "type": "string" - } - } - } - }, - "schemas": { - "type": "array", - "items": { - "type": "object", - "properties": { - "schema_name": { - "type": "string" - }, - "assets": { - "type": "string" - } - } - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/burns": { - "get": { - "tags": [ - "burns" - ], - "summary": "Get accounts which own atomicassets NFTs", - "parameters": [ - { - "name": "collection_name", - "in": "query", - "description": "Filter for specific collection", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter for specific schema", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter for specific template", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "account": { - "type": "string" - }, - "assets": { - "type": "string" - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/burns/{account}": { - "get": { - "tags": [ - "burns" - ], - "summary": "Get a specific account", - "parameters": [ - { - "name": "account", - "in": "path", - "description": "Account name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "hide_offers", - "in": "query", - "description": "Hide assets which are used in an offer", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "collections": { - "type": "array", - "items": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "assets": { - "type": "string" - } - } - } - }, - "templates": { - "type": "array", - "items": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "template_id": { - "type": "string" - }, - "assets": { - "type": "string" - } - } - } - }, - "assets": { - "type": "string" - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/config": { - "get": { - "tags": [ - "config" - ], - "summary": "Get general information about the API and the connected contract", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "version": { - "type": "string" - }, - "collection_format": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - } - } - }, - "supported_tokens": { - "type": "array", - "items": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - } - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/sales": { - "get": { - "tags": [ - "sales" - ], - "summary": "Get all sales. ", - "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", - "parameters": [ - { - "name": "state", - "in": "query", - "description": "Filter by sale state (0: WAITING - Sale created but offer was not send yet, 1: LISTED - Assets for sale, 2: CANCELED - Sale was canceled, 3: SOLD - Sale was bought4: INVALID - Sale is still listed but offer is currently invalid (can become valid again if the user owns all assets again)) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "max_assets", - "in": "query", - "description": "Max assets per listing", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "min_assets", - "in": "query", - "description": "Min assets per listing", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "show_seller_contracts", - "in": "query", - "description": "If false no seller contracts are shown except if they are in the contract whitelist", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "contract_whitelist", - "in": "query", - "description": "Show these accounts even if they are contracts", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "seller_blacklist", - "in": "query", - "description": "Dont show listings from these sellers (Split multiple with \",\")", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "buyer_blacklist", - "in": "query", - "description": "Dont show listings from these buyers (Split multiple with \",\")", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "asset_id", - "in": "query", - "description": "Asset id in the offer", - "required": false, - "schema": { - "type": "int" - } - }, - { - "name": "marketplace", - "in": "query", - "description": "Filter by all sales where a certain marketplace is either taker or maker marketplace - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "maker_marketplace", - "in": "query", - "description": "Maker marketplace - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "taker_marketplace", - "in": "query", - "description": "Taker marketplace - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Filter by symbol", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "account", - "in": "query", - "description": "Filter accounts that are either seller or buyer", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "seller", - "in": "query", - "description": "Filter by seller - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "buyer", - "in": "query", - "description": "Filter by buyer - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "min_price", - "in": "query", - "description": "Lower price limit", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "max_price", - "in": "query", - "description": "Upper price limit", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "min_template_mint", - "in": "query", - "description": "Min template mint", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "max_template_mint", - "in": "query", - "description": "Max template mint", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "owner", - "in": "query", - "description": "Filter by owner", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter by burned", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for input in asset name on template data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_immutable_name", - "in": "query", - "description": "Search for input in asset name on asset immutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_mutable_name", - "in": "query", - "description": "Search for input in asset name on asset mutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Check if asset is transferable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Check if asset is burnable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created", - "updated", - "sale_id", - "price", - "template_mint" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Sale" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/sales/templates": { - "get": { - "tags": [ - "sales" - ], - "summary": "Get the cheapest sale grouped by templates. ", - "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", - "parameters": [ - { - "name": "symbol", - "in": "query", - "description": "Token symbol", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "min_price", - "in": "query", - "description": "Min price", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "max_price", - "in": "query", - "description": "Max price", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "owner", - "in": "query", - "description": "Filter by owner", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter by burned", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for input in asset name on template data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_immutable_name", - "in": "query", - "description": "Search for input in asset name on asset immutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_mutable_name", - "in": "query", - "description": "Search for input in asset name on asset mutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Check if asset is transferable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Check if asset is burnable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "template_id", - "price" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Sale" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/sales/{sale_id}": { - "get": { - "tags": [ - "sales" - ], - "summary": "Get a specific sale by id", - "parameters": [ - { - "in": "path", - "name": "sale_id", - "description": "Sale Id", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Sale" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/sales/{sale_id}/logs": { - "get": { - "tags": [ - "sales" - ], - "summary": "Fetch sale logs", - "parameters": [ - { - "name": "sale_id", - "in": "path", - "description": "ID of sale", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/auctions": { - "get": { - "tags": [ - "auctions" - ], - "summary": "Get all auctions.", - "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", - "parameters": [ - { - "name": "state", - "in": "query", - "description": "Filter by auction state (0: WAITING: Auction created but assets were not transferred yet, 1: LISTED - Auction pending and open to bids, 2: CANCELED - Auction was canceled, 3: SOLD - Auction has been sold, 4: INVALID - Auction ended but no bid was made) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "bidder", - "in": "query", - "description": "Filter by auctions with this bidder", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "participant", - "in": "query", - "description": "Filter by auctions where this account participated and can still claim / bid", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "max_assets", - "in": "query", - "description": "Max assets per listing", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "min_assets", - "in": "query", - "description": "Min assets per listing", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "show_seller_contracts", - "in": "query", - "description": "If false no seller contracts are shown except if they are in the contract whitelist", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "contract_whitelist", - "in": "query", - "description": "Show these accounts even if they are contracts", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "seller_blacklist", - "in": "query", - "description": "Dont show listings from these sellers (Split multiple with \",\")", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "buyer_blacklist", - "in": "query", - "description": "Dont show listings from these buyers (Split multiple with \",\")", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "asset_id", - "in": "query", - "description": "Asset id in the offer", - "required": false, - "schema": { - "type": "int" - } - }, - { - "name": "marketplace", - "in": "query", - "description": "Filter by all sales where a certain marketplace is either taker or maker marketplace - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "maker_marketplace", - "in": "query", - "description": "Maker marketplace - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "taker_marketplace", - "in": "query", - "description": "Taker marketplace - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Filter by symbol", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "account", - "in": "query", - "description": "Filter accounts that are either seller or buyer", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "seller", - "in": "query", - "description": "Filter by seller - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "buyer", - "in": "query", - "description": "Filter by buyer - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "min_price", - "in": "query", - "description": "Lower price limit", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "max_price", - "in": "query", - "description": "Upper price limit", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "min_template_mint", - "in": "query", - "description": "Min template mint", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "max_template_mint", - "in": "query", - "description": "Max template mint", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "owner", - "in": "query", - "description": "Filter by owner", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter by burned", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for input in asset name on template data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_immutable_name", - "in": "query", - "description": "Search for input in asset name on asset immutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_mutable_name", - "in": "query", - "description": "Search for input in asset name on asset mutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Check if asset is transferable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Check if asset is burnable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created", - "updated", - "ending", - "auction_id", - "price", - "template_mint" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Auction" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/auctions/{auction_id}": { - "get": { - "tags": [ - "auctions" - ], - "summary": "Get a specific auction by id", - "parameters": [ - { - "in": "path", - "name": "auction_id", - "description": "Auction Id", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Auction" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/auctions/{auction_id}/logs": { - "get": { - "tags": [ - "auctions" - ], - "summary": "Fetch auction logs", - "parameters": [ - { - "name": "auction_id", - "in": "path", - "description": "ID of auction", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/buyoffers": { - "get": { - "tags": [ - "buyoffers" - ], - "summary": "Get all buyoffers.", - "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", - "parameters": [ - { - "name": "state", - "in": "query", - "description": "Filter by buyoffer state (0: WAITING: Buyoffer created and pending, 1: LISTED - Buyoffer was declined, 2: CANCELED - Buyoffer was canceled, 3: SOLD - Buyoffer has been sold, 4: INVALID - Buyoffer invalid because recipient does not own all assets anymore) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "max_assets", - "in": "query", - "description": "Max assets per listing", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "min_assets", - "in": "query", - "description": "Min assets per listing", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "show_seller_contracts", - "in": "query", - "description": "If false no seller contracts are shown except if they are in the contract whitelist", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "contract_whitelist", - "in": "query", - "description": "Show these accounts even if they are contracts", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "seller_blacklist", - "in": "query", - "description": "Dont show listings from these sellers (Split multiple with \",\")", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "buyer_blacklist", - "in": "query", - "description": "Dont show listings from these buyers (Split multiple with \",\")", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "asset_id", - "in": "query", - "description": "Asset id in the offer", - "required": false, - "schema": { - "type": "int" - } - }, - { - "name": "marketplace", - "in": "query", - "description": "Filter by all sales where a certain marketplace is either taker or maker marketplace - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "maker_marketplace", - "in": "query", - "description": "Maker marketplace - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "taker_marketplace", - "in": "query", - "description": "Taker marketplace - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Filter by symbol", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "account", - "in": "query", - "description": "Filter accounts that are either seller or buyer", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "seller", - "in": "query", - "description": "Filter by seller - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "buyer", - "in": "query", - "description": "Filter by buyer - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "min_price", - "in": "query", - "description": "Lower price limit", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "max_price", - "in": "query", - "description": "Upper price limit", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "min_template_mint", - "in": "query", - "description": "Min template mint", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "max_template_mint", - "in": "query", - "description": "Max template mint", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "owner", - "in": "query", - "description": "Filter by owner", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter by burned", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for input in asset name on template data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_immutable_name", - "in": "query", - "description": "Search for input in asset name on asset immutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_mutable_name", - "in": "query", - "description": "Search for input in asset name on asset mutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Check if asset is transferable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Check if asset is burnable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created", - "updated", - "buyoffer_id", - "price", - "template_mint" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Buyoffer" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/buyoffers/{buyoffer_id}": { - "get": { - "tags": [ - "buyoffers" - ], - "summary": "Get a specific buyoffer by id", - "parameters": [ - { - "in": "path", - "name": "buyoffer_id", - "description": "Buyoffer Id", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Buyoffer" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/buyoffers/{buyoffer_id}/logs": { - "get": { - "tags": [ - "buyoffers" - ], - "summary": "Fetch buyoffer logs", - "parameters": [ - { - "name": "buyoffer_id", - "in": "path", - "description": "ID of buyoffer", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/marketplaces": { - "get": { - "tags": [ - "marketplaces" - ], - "summary": "Get all registered marketplaces", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Marketplace" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/marketplaces/{marketplace_name}": { - "get": { - "tags": [ - "marketplaces" - ], - "summary": "Get atomicmarket config", - "parameters": [ - { - "in": "path", - "name": "marketplace_name", - "description": "Marketplace name", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Marketplace" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/assets/{asset_id}/sales": { - "get": { - "tags": [ - "assets" - ], - "summary": "Gets price history for a specific asset", - "parameters": [ - { - "in": "path", - "name": "asset_id", - "description": "Asset Id", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "buyer", - "in": "query", - "description": "Buyer", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "seller", - "in": "query", - "description": "Seller", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Token symbol", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "order", - "in": "query", - "description": "Order by time", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "asc" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "sale_id": { - "type": "string" - }, - "auction_id": { - "type": "string" - }, - "buyoffer_id": { - "type": "string" - }, - "price": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "seller": { - "type": "string" - }, - "buyer": { - "type": "string" - }, - "block_time": { - "type": "string" - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/prices/sales": { - "get": { - "tags": [ - "pricing" - ], - "summary": "Gets price history for a template or schema", - "parameters": [ - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Token symbol", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "sale_id": { - "type": "string" - }, - "auction_id": { - "type": "string" - }, - "buyoffer_id": { - "type": "string" - }, - "template_mint": { - "type": "string" - }, - "price": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "block_time": { - "type": "string" - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/prices/sales/days": { - "get": { - "tags": [ - "pricing" - ], - "summary": "Gets price history for a template or schema", - "parameters": [ - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Token symbol", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "average": { - "type": "string" - }, - "median": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "time": { - "type": "string" - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/prices/templates": { - "get": { - "tags": [ - "pricing" - ], - "summary": "Get template price stats", - "parameters": [ - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Token symbol", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "collection_name": { - "type": "string" - }, - "template_id": { - "type": "string" - }, - "average": { - "type": "string" - }, - "median": { - "type": "string" - }, - "suggested_average": { - "type": "string" - }, - "suggested_median": { - "type": "string" - }, - "min": { - "type": "string" - }, - "max": { - "type": "string" - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/prices/assets": { - "get": { - "tags": [ - "pricing" - ], - "summary": "Gets price history for a template or schema", - "parameters": [ - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "owner", - "in": "query", - "description": "Filter by owner", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter by burned", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for input in asset name on template data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_immutable_name", - "in": "query", - "description": "Search for input in asset name on asset immutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_mutable_name", - "in": "query", - "description": "Search for input in asset name on asset mutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Check if asset is transferable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Check if asset is burnable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "authorized_account", - "in": "query", - "description": "Filter for assets the provided account can edit. ", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_offers", - "in": "query", - "description": "Hide assets which are used in an offer", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "median": { - "type": "string" - }, - "average": { - "type": "string" - }, - "suggested_average": { - "type": "string" - }, - "suggested_median": { - "type": "string" - }, - "min": { - "type": "string" - }, - "max": { - "type": "string" - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/stats/collections": { - "get": { - "tags": [ - "stats" - ], - "summary": "Get market collections sorted by volume or listings", - "parameters": [ - { - "name": "symbol", - "in": "query", - "description": "Token Symbol", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "volume", - "listings" - ], - "default": "volume" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "symbol": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - } - } - }, - "results": { - "type": "array", - "items": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "market_fee": { - "type": "number" - }, - "data": { - "type": "object" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - }, - "listings": { - "type": "string" - }, - "volume": { - "type": "string" - }, - "sales": { - "type": "string" - } - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/stats/collections/{collection_name}": { - "get": { - "tags": [ - "stats" - ], - "summary": "Get market collections sorted by volume or listings", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Collection Name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Token Symbol", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "symbol": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - } - } - }, - "results": { - "type": "array", - "items": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "market_fee": { - "type": "number" - }, - "data": { - "type": "object" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - }, - "listings": { - "type": "string" - }, - "volume": { - "type": "string" - }, - "sales": { - "type": "string" - } - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/stats/accounts": { - "get": { - "tags": [ - "stats" - ], - "summary": "Get market collections sorted by volume or listings", - "parameters": [ - { - "name": "symbol", - "in": "query", - "description": "Token Symbol", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "buy_volume", - "sell_volume" - ], - "default": "buy_volume" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "symbol": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - } - } - }, - "results": { - "type": "array", - "items": { - "type": "object", - "properties": { - "account": { - "type": "string" - }, - "buy_volume": { - "type": "string" - }, - "sell_volume": { - "type": "string" - } - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/stats/accounts/{account}": { - "get": { - "tags": [ - "stats" - ], - "summary": "Get market collections sorted by volume or listings", - "parameters": [ - { - "name": "account", - "in": "path", - "description": "Account Name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Token Symbol", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "symbol": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - } - } - }, - "result": { - "type": "array", - "items": { - "type": "object", - "properties": { - "account": { - "type": "string" - }, - "buy_volume": { - "type": "string" - }, - "sell_volume": { - "type": "string" - } - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/stats/schemas/{collection_name}": { - "get": { - "tags": [ - "stats" - ], - "summary": "Get market schemas sorted by volume or listings", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Collection Name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Token Symbol", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "volume", - "listings" - ], - "default": "volume" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "symbol": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - } - } - }, - "results": { - "type": "array", - "items": { - "type": "object", - "properties": { - "schema_name": { - "type": "string" - }, - "listings": { - "type": "string" - }, - "volume": { - "type": "string" - } - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/stats/graph": { - "get": { - "tags": [ - "stats" - ], - "summary": "Get history of volume and", - "parameters": [ - { - "name": "symbol", - "in": "query", - "description": "Token Symbol", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "symbol": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - } - } - }, - "results": { - "type": "array", - "items": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "volume": { - "type": "string" - }, - "sales": { - "type": "string" - } - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/stats/sales": { - "get": { - "tags": [ - "stats" - ], - "summary": "Get total sales and volume", - "parameters": [ - { - "name": "symbol", - "in": "query", - "description": "Token Symbol", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "symbol": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - } - } - }, - "results": { - "type": "object", - "properties": { - "volume": { - "type": "string" - }, - "sales": { - "type": "string" - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/config": { - "get": { - "tags": [ - "config" - ], - "summary": "Get atomicmarket config", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "atomicassets_contract": { - "type": "string" - }, - "atomicmarket_contract": { - "type": "string" - }, - "delphioracle_contract": { - "type": "string" - }, - "version": { - "type": "string" - }, - "maker_market_fee": { - "type": "number" - }, - "taker_market_fee": { - "type": "number" - }, - "minimum_auction_duration": { - "type": "integer" - }, - "maximum_auction_duration": { - "type": "integer" - }, - "minimum_bid_increase": { - "type": "number" - }, - "auction_reset_duration": { - "type": "integer" - }, - "supported_tokens": { - "type": "array", - "items": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - } - } - } - }, - "supported_pairs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "listing_symbol": { - "type": "string" - }, - "settlement_symbol": { - "type": "string" - }, - "delphi_pair_name": { - "type": "string" - }, - "invert_delphi_pair": { - "type": "boolean" - } - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/assets": { - "get": { - "tags": [ - "assets" - ], - "summary": "Fetch assets.", - "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", - "parameters": [ - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "owner", - "in": "query", - "description": "Filter by owner", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter by burned", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for input in asset name on template data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_immutable_name", - "in": "query", - "description": "Search for input in asset name on asset immutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_mutable_name", - "in": "query", - "description": "Search for input in asset name on asset mutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Check if asset is transferable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Check if asset is burnable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "only_duplicate_templates", - "in": "query", - "description": "Show only duplicate assets grouped by template", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "has_backed_tokens", - "in": "query", - "description": "Show only assets that are backed by a token", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "authorized_account", - "in": "query", - "description": "Filter for assets the provided account can edit. ", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_whitelist", - "in": "query", - "description": "Filter for multiple template ids split by \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_blacklist", - "in": "query", - "description": "Dont include specific template ids split by \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_templates_by_accounts", - "in": "query", - "description": "Dont templates that are owned by an account", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_offers", - "in": "query", - "description": "Hide assets which are used in an offer", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asset_id", - "minted", - "updated", - "transferred", - "template_mint", - "name", - "suggested_median_price", - "suggested_average_price", - "median_price", - "average_price" - ], - "default": "asset_id" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/undefined" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/assets/{asset_id}": { - "get": { - "tags": [ - "assets" - ], - "summary": "Fetch asset by id", - "parameters": [ - { - "name": "asset_id", - "in": "path", - "description": "ID of asset", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/ListingAsset" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/assets/{asset_id}/stats": { - "get": { - "tags": [ - "assets" - ], - "summary": "Fetch asset stats", - "parameters": [ - { - "name": "asset_id", - "in": "path", - "description": "ID of asset", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "template_mint": { - "type": "integer" - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/assets/{asset_id}/logs": { - "get": { - "tags": [ - "assets" - ], - "summary": "Fetch asset logs", - "parameters": [ - { - "name": "asset_id", - "in": "path", - "description": "ID of asset", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/transfers": { - "get": { - "tags": [ - "transfers" - ], - "summary": "Fetch transfers", - "parameters": [ - { - "name": "account", - "in": "query", - "description": "Notified account (can be sender or recipient) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sender", - "in": "query", - "description": "Transfer sender - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "recipient", - "in": "query", - "description": "Transfer recipient - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "asset_id", - "in": "query", - "description": "only transfers which contain this asset_id - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "only transfers which contain assets of this template - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "only transfers which contain assets of this schema - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_name", - "in": "query", - "description": "only transfers which contain assets of this collection - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_contracts", - "in": "query", - "description": "dont show transfers from or to accounts that have code deployed", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ListingTransfer" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/offers": { - "get": { - "tags": [ - "offers" - ], - "summary": "Fetch offers", - "parameters": [ - { - "name": "account", - "in": "query", - "description": "Notified account (can be sender or recipient) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sender", - "in": "query", - "description": "Offer sender - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "recipient", - "in": "query", - "description": "Offer recipient - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "state", - "in": "query", - "description": "Filter by Offer State (0: PENDING - Offer created and valid, 1: INVALID - Assets are missing because ownership has changed, 2: UNKNOWN - Offer is not valid anymore, 3: ACCEPTED - Offer was accepted, 4: DECLINED - Offer was declined by recipient, 5: CANCELLED - Offer was canceled by sender) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "is_recipient_contract", - "in": "query", - "description": "Filter offers where recipient is a contract", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "asset_id", - "in": "query", - "description": "only offers which contain this asset_id - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "only offers which contain assets of this template - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "only offers which contain assets of this schema - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_name", - "in": "query", - "description": "only offers which contain assets of this collection - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "account_whitelist", - "in": "query", - "description": "Only offers which are sent by one of these accounts", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "account_blacklist", - "in": "query", - "description": "Exclude offers which are sent by one of these accounts", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sender_asset_whitelist", - "in": "query", - "description": "Only offers which contain these assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sender_asset_blacklist", - "in": "query", - "description": "Exclude offers which contain these assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "recipient_asset_whitelist", - "in": "query", - "description": "Only offers which contain these assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "recipient_asset_blacklist", - "in": "query", - "description": "Exclude offers which contain these assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_contracts", - "in": "query", - "description": "dont show offers from or to accounts that have code deployed", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created", - "updated" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ListingOffer" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/offers/{offer_id}": { - "get": { - "tags": [ - "offers" - ], - "summary": "Find offer by id", - "parameters": [ - { - "name": "offer_id", - "in": "path", - "description": "ID of offer", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/ListingOffer" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/offers/{offer_id}/logs": { - "get": { - "tags": [ - "offers" - ], - "summary": "Fetch offer logs", - "parameters": [ - { - "name": "offer_id", - "in": "path", - "description": "ID of offer", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomictools/v1/links": { - "get": { - "tags": [ - "links" - ], - "summary": "Get all links", - "parameters": [ - { - "name": "creator", - "in": "query", - "description": "Link Creator", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "claimer", - "in": "query", - "description": "Claimer of the link if it was claimed", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "public_key", - "in": "query", - "description": "Public key which is used to share the assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "state", - "in": "query", - "description": "Filter by link state (0: WAITING - Link created but items were not transferred yet, 1: CREATED - Link is pending, 2: CANCELED - Creator canceled link, 3: CLAIMED - Link was claimed, ) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Link" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomictools/v1/links/{link_id}": { - "get": { - "tags": [ - "links" - ], - "summary": "Get a specific link by id", - "parameters": [ - { - "in": "path", - "name": "link_id", - "description": "Link Id", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Link" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomictools/v1/links/{link_id}/logs": { - "get": { - "tags": [ - "links" - ], - "summary": "Fetch link logs", - "parameters": [ - { - "name": "link_id", - "in": "path", - "description": "ID of link", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomictools/v1/config": { - "get": { - "tags": [ - "config" - ], - "summary": "Get atomictools config", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "atomictools_contract": { - "type": "string" - }, - "atomicassets_contract": { - "type": "string" - }, - "version": { - "type": "string" - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Log": { - "type": "object", - "properties": { - "log_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "data": { - "type": "object" - }, - "txid": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "Asset": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "asset_id": { - "type": "string" - }, - "owner": { - "type": "string" - }, - "name": { - "type": "string" - }, - "is_transferable": { - "type": "boolean" - }, - "is_burnable": { - "type": "boolean" - }, - "template_mint": { - "type": "string" - }, - "collection": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "market_fee": { - "type": "number" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "schema": { - "type": "object", - "properties": { - "schema_name": { - "type": "string" - }, - "format": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - } - } - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "template": { - "type": "object", - "properties": { - "template_id": { - "type": "string" - }, - "max_supply": { - "type": "string" - }, - "issued_supply": { - "type": "string" - }, - "is_transferable": { - "type": "boolean" - }, - "is_burnable": { - "type": "boolean" - }, - "immutable_data": { - "type": "object" - }, - "created_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - } - } - }, - "backed_tokens": { - "type": "array", - "items": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "amount": { - "type": "string" - } - } - } - }, - "immutable_data": { - "type": "object" - }, - "mutable_data": { - "type": "object" - }, - "data": { - "type": "object" - }, - "burned_by_account": { - "type": "string" - }, - "burned_at_block": { - "type": "string" - }, - "burned_at_time": { - "type": "string" - }, - "updated_at_block": { - "type": "string" - }, - "updated_at_time": { - "type": "string" - }, - "transferred_at_block": { - "type": "string" - }, - "transferred_at_time": { - "type": "string" - }, - "minted_at_block": { - "type": "string" - }, - "minted_at_time": { - "type": "string" - } - } - }, - "Collection": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "market_fee": { - "type": "number" - }, - "data": { - "type": "object" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "Schema": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "schema_name": { - "type": "string" - }, - "format": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - } - } - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - }, - "collection": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "market_fee": { - "type": "number" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - } - } - }, - "Template": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "template_id": { - "type": "string" - }, - "max_supply": { - "type": "string" - }, - "issued_supply": { - "type": "string" - }, - "is_transferable": { - "type": "boolean" - }, - "is_burnable": { - "type": "boolean" - }, - "immutable_data": { - "type": "object" - }, - "created_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "scheme": { - "type": "object", - "properties": { - "schema_name": { - "type": "string" - }, - "format": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - } - } - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "collection": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "market_fee": { - "type": "number" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - } - } - }, - "Offer": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "offer_id": { - "type": "string" - }, - "sender_name": { - "type": "string" - }, - "recipient_name": { - "type": "string" - }, - "memo": { - "type": "string" - }, - "state": { - "type": "integer" - }, - "is_sender_contract": { - "type": "boolean" - }, - "is_recipient_contract": { - "type": "boolean" - }, - "sender_assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } - }, - "recipient_assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } - }, - "updated_at_block": { - "type": "string" - }, - "updated_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "Transfer": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "transfer_id": { - "type": "string" - }, - "sender_name": { - "type": "string" - }, - "recipient_name": { - "type": "string" - }, - "memo": { - "type": "string" - }, - "assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "ListingAsset": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "asset_id": { - "type": "string" - }, - "owner": { - "type": "string" - }, - "name": { - "type": "string" - }, - "is_transferable": { - "type": "boolean" - }, - "is_burnable": { - "type": "boolean" - }, - "template_mint": { - "type": "string" - }, - "collection": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "market_fee": { - "type": "number" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "schema": { - "type": "object", - "properties": { - "schema_name": { - "type": "string" - }, - "format": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - } - } - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "template": { - "type": "object", - "properties": { - "template_id": { - "type": "string" - }, - "max_supply": { - "type": "string" - }, - "issued_supply": { - "type": "string" - }, - "is_transferable": { - "type": "boolean" - }, - "is_burnable": { - "type": "boolean" - }, - "immutable_data": { - "type": "object" - }, - "created_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - } - } - }, - "backed_tokens": { - "type": "array", - "items": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "amount": { - "type": "string" - } - } - } - }, - "immutable_data": { - "type": "object" - }, - "mutable_data": { - "type": "object" - }, - "data": { - "type": "object" - }, - "burned_by_account": { - "type": "string" - }, - "burned_at_block": { - "type": "string" - }, - "burned_at_time": { - "type": "string" - }, - "updated_at_block": { - "type": "string" - }, - "updated_at_time": { - "type": "string" - }, - "transferred_at_block": { - "type": "string" - }, - "transferred_at_time": { - "type": "string" - }, - "minted_at_block": { - "type": "string" - }, - "minted_at_time": { - "type": "string" - }, - "sales": { - "type": "array", - "items": { - "type": "object", - "properties": { - "market_contract": { - "type": "string" - }, - "sale_id": { + "version": "1.0.0", + "title": "Swagger Petstore", + "license": { + "name": "MIT" + } + }, + "servers": [ + { + "url": "http://petstore.swagger.io/v1" + } + ], + "paths": { + "/pets": { + "get": { + "summary": "List all pets", + "operationId": "listPets", + "tags": [ + "pets" + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "How many items to return at one time (max 100)", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "A paged array of pets", + "headers": { + "x-next": { + "description": "A link to the next page of responses", + "schema": { "type": "string" } } - } - }, - "auctions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "market_contract": { - "type": "string" - }, - "auction_id": { - "type": "string" + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pets" } } } }, - "prices": { - "type": "array", - "items": { - "type": "object", - "properties": { - "average": { - "type": "string" - }, - "market_contract": { - "type": "string" - }, - "max": { - "type": "string" - }, - "median": { - "type": "string" - }, - "min": { - "type": "string" - }, - "sales": { - "type": "string" - }, - "suggested_average": { - "type": "string" - }, - "suggested_median": { - "type": "string" - }, - "token": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_symbol": { - "type": "string" - } - } + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } } } }, - "ListingOffer": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "offer_id": { - "type": "string" - }, - "sender_name": { - "type": "string" - }, - "recipient_name": { - "type": "string" - }, - "memo": { - "type": "string" - }, - "state": { - "type": "integer" - }, - "is_sender_contract": { - "type": "boolean" - }, - "is_recipient_contract": { - "type": "boolean" - }, - "sender_assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ListingAsset" - } - }, - "recipient_assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ListingAsset" - } - }, - "updated_at_block": { - "type": "string" - }, - "updated_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "ListingTransfer": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "transfer_id": { - "type": "string" - }, - "sender_name": { - "type": "string" - }, - "recipient_name": { - "type": "string" - }, - "memo": { - "type": "string" - }, - "assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ListingAsset" - } - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "Sale": { - "type": "object", - "properties": { - "market_contract": { - "type": "string" - }, - "assets_contract": { - "type": "string" - }, - "sale_id": { - "type": "string" - }, - "seller": { - "type": "string" - }, - "buyer": { - "type": "string" - }, - "offer_id": { - "type": "string" - }, - "price": { - "type": "object", - "properties": { - "amount": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" + "post": { + "summary": "Create a pet", + "operationId": "createPets", + "tags": [ + "pets" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" } } }, - "listing_price": { - "type": "number" - }, - "listing_symbol": { - "type": "string" - }, - "assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } - }, - "maker_marketplace": { - "type": "string", - "nullable": true - }, - "taker_marketplace": { - "type": "string", - "nullable": true + "required": true + }, + "responses": { + "201": { + "description": "Null response" }, - "collection": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } - }, - "market_fee": { - "type": "number" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" } } - }, - "state": { - "type": "integer" - }, - "updated_at_block": { - "type": "string" - }, - "updated_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" } } - }, - "Auction": { - "type": "object", - "properties": { - "market_contract": { - "type": "string" - }, - "assets_contract": { - "type": "string" - }, - "auction_id": { - "type": "string" - }, - "seller": { - "type": "string" - }, - "buyer": { - "type": "string", - "nullable": true - }, - "price": { - "type": "object", - "properties": { - "amount": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - } - } - }, - "assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" + } + }, + "/pets/{petId}": { + "get": { + "summary": "Info for a specific pet", + "operationId": "showPetById", + "tags": [ + "pets" + ], + "parameters": [ + { + "name": "petId", + "in": "path", + "required": true, + "description": "The id of the pet to retrieve", + "schema": { + "type": "string" } - }, - "bids": { - "type": "array", - "items": { - "type": "object", - "properties": { - "number": { - "type": "integer" - }, - "account": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - }, - "txid": { - "type": "string" + } + ], + "responses": { + "200": { + "description": "Expected response to a valid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" } } } }, - "maker_marketplace": { - "type": "string", - "nullable": true - }, - "taker_marketplace": { - "type": "string", - "nullable": true - }, - "collection": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } - }, - "market_fee": { - "type": "number" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" } } - }, - "state": { - "type": "integer" - }, - "end_time": { - "type": "string" - }, - "updated_at_block": { - "type": "string" - }, - "updated_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" } } - }, - "Buyoffer": { + } + } + }, + "components": { + "schemas": { + "Pet": { "type": "object", + "required": [ + "id", + "name" + ], "properties": { - "market_contract": { - "type": "string" - }, - "assets_contract": { - "type": "string" - }, - "buyoffer_id": { - "type": "string" - }, - "seller": { - "type": "string" - }, - "buyer": { - "type": "string" - }, - "price": { - "type": "object", - "properties": { - "amount": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - } - } - }, - "assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } - }, - "maker_marketplace": { - "type": "string", - "nullable": true - }, - "taker_marketplace": { - "type": "string", - "nullable": true - }, - "collection": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "market_fee": { - "type": "number" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "state": { - "type": "integer" - }, - "memo": { - "type": "string" - }, - "decline_memo": { - "type": "string" - }, - "updated_at_block": { - "type": "string" - }, - "updated_at_time": { - "type": "string" + "id": { + "type": "integer", + "format": "int64" }, - "created_at_block": { + "name": { "type": "string" }, - "created_at_time": { + "tag": { "type": "string" } } }, - "Marketplace": { - "type": "object", - "properties": { - "marketplace_name": { - "type": "string" - }, - "creator": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } + "Pets": { + "type": "array", + "maxItems": 100, + "items": { + "$ref": "#/components/schemas/Pet" } }, - "Link": { + "Error": { "type": "object", + "required": [ + "code", + "message" + ], "properties": { - "tools_contract": { - "type": "string" - }, - "assets_contract": { - "type": "string" - }, - "link_id": { - "type": "string" - }, - "creator": { - "type": "string" - }, - "claimer": { - "type": "string", - "nullable": true - }, - "state": { - "type": "integer" - }, - "public_key": { - "type": "string" - }, - "memo": { - "type": "string" - }, - "txid": { - "type": "string" - }, - "assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } - }, - "created_at_block": { - "type": "string" + "code": { + "type": "integer", + "format": "int32" }, - "created_at_time": { + "message": { "type": "string" } } diff --git a/tests/Transformer/openapi/expect/00_openapi.json b/tests/Transformer/openapi/expect/00_openapi.json index 77f53b59..75812f26 100644 --- a/tests/Transformer/openapi/expect/00_openapi.json +++ b/tests/Transformer/openapi/expect/00_openapi.json @@ -1,11516 +1,184 @@ { - "openapi": "3.0.3", + "openapi": "3.0.0", "info": { - "description": "### EOSIO Contract API\n*Made with ♥️ by [pink.gg](https://pink.gg/)*\n#### Current Chain: wax-mainnet\n#### Provided by: [Zeptagram](https://zeptagram.com)", - "version": "1.2.12", - "title": "EOSIO Contract API" + "version": "1.0.0", + "title": "Swagger Petstore", + "license": { + "name": "MIT" + } }, "servers": [ { - "url": "https://wmnft.zeptagram.com" - }, - { - "url": "http://wmnft.zeptagram.com" - } - ], - "tags": [ - { - "name": "assets", - "description": "Assets" - }, - { - "name": "assets", - "description": "Assets" - }, - { - "name": "collections", - "description": "Collections" - }, - { - "name": "schemas", - "description": "Schemas" - }, - { - "name": "templates", - "description": "Templates" - }, - { - "name": "offers", - "description": "Offers" - }, - { - "name": "transfers", - "description": "Transfers" - }, - { - "name": "accounts", - "description": "Accounts" - }, - { - "name": "burns", - "description": "Burns" - }, - { - "name": "config", - "description": "Config" - }, - { - "name": "sales", - "description": "Sales" - }, - { - "name": "auctions", - "description": "Auctions" - }, - { - "name": "buyoffers", - "description": "Buyoffers" - }, - { - "name": "marketplaces", - "description": "Marketplaces" - }, - { - "name": "pricing", - "description": "Pricing" - }, - { - "name": "stats", - "description": "Stats" - }, - { - "name": "config", - "description": "Config" - }, - { - "name": "assets", - "description": "Assets" - }, - { - "name": "assets", - "description": "Assets" - }, - { - "name": "transfers", - "description": "Transfers" - }, - { - "name": "offers", - "description": "Offers" - }, - { - "name": "links", - "description": "Share Links" - }, - { - "name": "config", - "description": "Config" + "url": "http:\/\/petstore.swagger.io\/v1" } ], "paths": { - "/atomicassets/v1/assets": { + "\/pets": { "get": { + "summary": "List all pets", + "operationId": "listPets", "tags": [ - "assets" + "pets" ], - "summary": "Fetch assets.", - "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", "parameters": [ - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "owner", - "in": "query", - "description": "Filter by owner", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter by burned", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for input in asset name on template data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_immutable_name", - "in": "query", - "description": "Search for input in asset name on asset immutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_mutable_name", - "in": "query", - "description": "Search for input in asset name on asset mutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Check if asset is transferable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Check if asset is burnable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "only_duplicate_templates", - "in": "query", - "description": "Show only duplicate assets grouped by template", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "has_backed_tokens", - "in": "query", - "description": "Show only assets that are backed by a token", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "authorized_account", - "in": "query", - "description": "Filter for assets the provided account can edit. ", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_whitelist", - "in": "query", - "description": "Filter for multiple template ids split by \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_blacklist", - "in": "query", - "description": "Dont include specific template ids split by \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_templates_by_accounts", - "in": "query", - "description": "Dont templates that are owned by an account", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_offers", - "in": "query", - "description": "Hide assets which are used in an offer", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, { "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asset_id", - "minted", - "updated", - "transferred", - "template_mint", - "name" - ], - "default": "asset_id" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/assets/{asset_id}": { - "get": { - "tags": [ - "assets" - ], - "summary": "Fetch asset by id", - "parameters": [ - { - "name": "asset_id", - "in": "path", - "description": "ID of asset", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Asset" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/assets/{asset_id}/stats": { - "get": { - "tags": [ - "assets" - ], - "summary": "Fetch asset stats", - "parameters": [ - { - "name": "asset_id", - "in": "path", - "description": "ID of asset", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "template_mint": { - "type": "integer" - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/assets/{asset_id}/logs": { - "get": { - "tags": [ - "assets" - ], - "summary": "Fetch asset logs", - "parameters": [ - { - "name": "asset_id", - "in": "path", - "description": "ID of asset", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/collections": { - "get": { - "tags": [ - "collections" - ], - "summary": "Fetch collections", - "parameters": [ - { - "name": "author", - "in": "query", - "description": "Get collections by author", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for input in collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "authorized_account", - "in": "query", - "description": "Filter for collections which the provided account can use to create assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "notify_account", - "in": "query", - "description": "Filter for collections where the provided account is notified", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created", - "collection_name" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Collection" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/collections/{collection_name}": { - "get": { - "tags": [ - "collections" - ], - "summary": "Find collection by its name", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Name of collection", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Collection" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/collections/{collection_name}/stats": { - "get": { - "tags": [ - "collections" - ], - "summary": "Get stats about collection", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Name of collection", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "assets": { - "type": "string" - }, - "burned": { - "type": "string" - }, - "templates": { - "type": "string" - }, - "schemas": { - "type": "string" - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/collections/{collection_name}/logs": { - "get": { - "tags": [ - "collections" - ], - "summary": "Fetch collection logs", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Name of collection", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/schemas": { - "get": { - "tags": [ - "schemas" - ], - "summary": "Fetch schemas", - "parameters": [ - { - "name": "collection_name", - "in": "query", - "description": "Get all schemas within the collection", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "authorized_account", - "in": "query", - "description": "Filter for schemas the provided account can edit", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for input in schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created", - "schema_name" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Schema" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/schemas/{collection_name}/{schema_name}": { - "get": { - "tags": [ - "schemas" - ], - "summary": "Find schema by schema_name", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Collection name of schema", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "path", - "description": "Name of schema", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Schema" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/schemas/{collection_name}/{schema_name}/stats": { - "get": { - "tags": [ - "schemas" - ], - "summary": "Get stats about a specific schema", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Collection name of schema", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "path", - "description": "Name of schema", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "assets": { - "type": "string" - }, - "burned": { - "type": "string" - }, - "templates": { - "type": "string" - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/schemas/{collection_name}/{schema_name}/logs": { - "get": { - "tags": [ - "schemas" - ], - "summary": "Fetch schema logs", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Collection name of schema", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "path", - "description": "Name of schema", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/templates": { - "get": { - "tags": [ - "templates" - ], - "summary": "Fetch templates.", - "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", - "parameters": [ - { - "name": "collection_name", - "in": "query", - "description": "Get all templates within the collection", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Get all templates which implement that schema", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "issued_supply", - "in": "query", - "description": "Filter by issued supply", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "min_issued_supply", - "in": "query", - "description": "Filter by issued supply", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "max_issued_supply", - "in": "query", - "description": "Filter by issued supply", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "has_assets", - "in": "query", - "description": "Only show templates with existing supply > 0", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "max_supply", - "in": "query", - "description": "Filter by max supply", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter by burnable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter by transferable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "authorized_account", - "in": "query", - "description": "Filter for templates the provided account can use", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for template id or", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "name", - "created" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Template" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/templates/{collection_name}/{template_id}": { - "get": { - "tags": [ - "templates" - ], - "summary": "Find template by id", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Name of collection", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "path", - "description": "ID of template", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Template" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/templates/{collection_name}/{template_id}/stats": { - "get": { - "tags": [ - "templates" - ], - "summary": "Get stats about a specific template", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Name of collection", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "path", - "description": "ID of template", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "assets": { - "type": "string" - }, - "burned": { - "type": "string" - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/templates/{collection_name}/{template_id}/logs": { - "get": { - "tags": [ - "templates" - ], - "summary": "Fetch template logs", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Name of collection", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "path", - "description": "ID of template", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/offers": { - "get": { - "tags": [ - "offers" - ], - "summary": "Fetch offers", - "parameters": [ - { - "name": "account", - "in": "query", - "description": "Notified account (can be sender or recipient) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sender", - "in": "query", - "description": "Offer sender - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "recipient", - "in": "query", - "description": "Offer recipient - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "state", - "in": "query", - "description": "Filter by Offer State (0: PENDING - Offer created and valid, 1: INVALID - Assets are missing because ownership has changed, 2: UNKNOWN - Offer is not valid anymore, 3: ACCEPTED - Offer was accepted, 4: DECLINED - Offer was declined by recipient, 5: CANCELLED - Offer was canceled by sender) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "is_recipient_contract", - "in": "query", - "description": "Filter offers where recipient is a contract", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "asset_id", - "in": "query", - "description": "only offers which contain this asset_id - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "only offers which contain assets of this template - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "only offers which contain assets of this schema - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_name", - "in": "query", - "description": "only offers which contain assets of this collection - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "account_whitelist", - "in": "query", - "description": "Only offers which are sent by one of these accounts", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "account_blacklist", - "in": "query", - "description": "Exclude offers which are sent by one of these accounts", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sender_asset_whitelist", - "in": "query", - "description": "Only offers which contain these assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sender_asset_blacklist", - "in": "query", - "description": "Exclude offers which contain these assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "recipient_asset_whitelist", - "in": "query", - "description": "Only offers which contain these assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "recipient_asset_blacklist", - "in": "query", - "description": "Exclude offers which contain these assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_contracts", - "in": "query", - "description": "dont show offers from or to accounts that have code deployed", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created", - "updated" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Offer" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/offers/{offer_id}": { - "get": { - "tags": [ - "offers" - ], - "summary": "Find offer by id", - "parameters": [ - { - "name": "offer_id", - "in": "path", - "description": "ID of offer", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Offer" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/offers/{offer_id}/logs": { - "get": { - "tags": [ - "offers" - ], - "summary": "Fetch offer logs", - "parameters": [ - { - "name": "offer_id", - "in": "path", - "description": "ID of offer", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/transfers": { - "get": { - "tags": [ - "transfers" - ], - "summary": "Fetch transfers", - "parameters": [ - { - "name": "account", - "in": "query", - "description": "Notified account (can be sender or recipient) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sender", - "in": "query", - "description": "Transfer sender - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "recipient", - "in": "query", - "description": "Transfer recipient - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "asset_id", - "in": "query", - "description": "only transfers which contain this asset_id - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "only transfers which contain assets of this template - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "only transfers which contain assets of this schema - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_name", - "in": "query", - "description": "only transfers which contain assets of this collection - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_contracts", - "in": "query", - "description": "dont show transfers from or to accounts that have code deployed", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Transfer" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/accounts": { - "get": { - "tags": [ - "accounts" - ], - "summary": "Get accounts which own atomicassets NFTs", - "parameters": [ - { - "name": "match", - "in": "query", - "description": "Search for partial account name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_name", - "in": "query", - "description": "Filter for specific collection", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter for specific schema", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter for specific template", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_offers", - "in": "query", - "description": "Hide assets which are used in an offer", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "account": { - "type": "string" - }, - "assets": { - "type": "string" - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/accounts/{account}": { - "get": { - "tags": [ - "accounts" - ], - "summary": "Get a specific account", - "parameters": [ - { - "name": "account", - "in": "path", - "description": "Account name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "hide_offers", - "in": "query", - "description": "Hide assets which are used in an offer", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "collections": { - "type": "array", - "items": { - "type": "object", - "properties": { - "collection": { - "$ref": "#/components/schemas/Collection" - }, - "assets": { - "type": "string" - } - } - } - }, - "templates": { - "type": "array", - "items": { - "type": "object", - "properties": { - "template_id": { - "type": "string" - }, - "assets": { - "type": "string" - } - } - } - }, - "assets": { - "type": "string" - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/accounts/{account}/{collection_name}": { - "get": { - "tags": [ - "accounts" - ], - "summary": "Get templates and schemas count by account", - "parameters": [ - { - "name": "account", - "in": "path", - "description": "Account name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "collection_name", - "in": "path", - "description": "Collection Name", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "templates": { - "type": "array", - "items": { - "type": "object", - "properties": { - "template_id": { - "type": "string" - }, - "assets": { - "type": "string" - } - } - } - }, - "schemas": { - "type": "array", - "items": { - "type": "object", - "properties": { - "schema_name": { - "type": "string" - }, - "assets": { - "type": "string" - } - } - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/burns": { - "get": { - "tags": [ - "burns" - ], - "summary": "Get accounts which own atomicassets NFTs", - "parameters": [ - { - "name": "collection_name", - "in": "query", - "description": "Filter for specific collection", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter for specific schema", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter for specific template", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "account": { - "type": "string" - }, - "assets": { - "type": "string" - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/burns/{account}": { - "get": { - "tags": [ - "burns" - ], - "summary": "Get a specific account", - "parameters": [ - { - "name": "account", - "in": "path", - "description": "Account name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "hide_offers", - "in": "query", - "description": "Hide assets which are used in an offer", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "collections": { - "type": "array", - "items": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "assets": { - "type": "string" - } - } - } - }, - "templates": { - "type": "array", - "items": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "template_id": { - "type": "string" - }, - "assets": { - "type": "string" - } - } - } - }, - "assets": { - "type": "string" - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicassets/v1/config": { - "get": { - "tags": [ - "config" - ], - "summary": "Get general information about the API and the connected contract", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "version": { - "type": "string" - }, - "collection_format": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - } - } - }, - "supported_tokens": { - "type": "array", - "items": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - } - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/sales": { - "get": { - "tags": [ - "sales" - ], - "summary": "Get all sales. ", - "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", - "parameters": [ - { - "name": "state", - "in": "query", - "description": "Filter by sale state (0: WAITING - Sale created but offer was not send yet, 1: LISTED - Assets for sale, 2: CANCELED - Sale was canceled, 3: SOLD - Sale was bought4: INVALID - Sale is still listed but offer is currently invalid (can become valid again if the user owns all assets again)) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "max_assets", - "in": "query", - "description": "Max assets per listing", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "min_assets", - "in": "query", - "description": "Min assets per listing", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "show_seller_contracts", - "in": "query", - "description": "If false no seller contracts are shown except if they are in the contract whitelist", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "contract_whitelist", - "in": "query", - "description": "Show these accounts even if they are contracts", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "seller_blacklist", - "in": "query", - "description": "Dont show listings from these sellers (Split multiple with \",\")", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "buyer_blacklist", - "in": "query", - "description": "Dont show listings from these buyers (Split multiple with \",\")", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "asset_id", - "in": "query", - "description": "Asset id in the offer", - "required": false, - "schema": { - "type": "int" - } - }, - { - "name": "marketplace", - "in": "query", - "description": "Filter by all sales where a certain marketplace is either taker or maker marketplace - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "maker_marketplace", - "in": "query", - "description": "Maker marketplace - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "taker_marketplace", - "in": "query", - "description": "Taker marketplace - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Filter by symbol", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "account", - "in": "query", - "description": "Filter accounts that are either seller or buyer", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "seller", - "in": "query", - "description": "Filter by seller - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "buyer", - "in": "query", - "description": "Filter by buyer - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "min_price", - "in": "query", - "description": "Lower price limit", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "max_price", - "in": "query", - "description": "Upper price limit", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "min_template_mint", - "in": "query", - "description": "Min template mint", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "max_template_mint", - "in": "query", - "description": "Max template mint", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "owner", - "in": "query", - "description": "Filter by owner", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter by burned", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for input in asset name on template data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_immutable_name", - "in": "query", - "description": "Search for input in asset name on asset immutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_mutable_name", - "in": "query", - "description": "Search for input in asset name on asset mutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Check if asset is transferable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Check if asset is burnable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created", - "updated", - "sale_id", - "price", - "template_mint" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Sale" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/sales/templates": { - "get": { - "tags": [ - "sales" - ], - "summary": "Get the cheapest sale grouped by templates. ", - "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", - "parameters": [ - { - "name": "symbol", - "in": "query", - "description": "Token symbol", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "min_price", - "in": "query", - "description": "Min price", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "max_price", - "in": "query", - "description": "Max price", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "owner", - "in": "query", - "description": "Filter by owner", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter by burned", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for input in asset name on template data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_immutable_name", - "in": "query", - "description": "Search for input in asset name on asset immutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_mutable_name", - "in": "query", - "description": "Search for input in asset name on asset mutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Check if asset is transferable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Check if asset is burnable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "template_id", - "price" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Sale" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/sales/{sale_id}": { - "get": { - "tags": [ - "sales" - ], - "summary": "Get a specific sale by id", - "parameters": [ - { - "in": "path", - "name": "sale_id", - "description": "Sale Id", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Sale" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/sales/{sale_id}/logs": { - "get": { - "tags": [ - "sales" - ], - "summary": "Fetch sale logs", - "parameters": [ - { - "name": "sale_id", - "in": "path", - "description": "ID of sale", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/auctions": { - "get": { - "tags": [ - "auctions" - ], - "summary": "Get all auctions.", - "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", - "parameters": [ - { - "name": "state", - "in": "query", - "description": "Filter by auction state (0: WAITING: Auction created but assets were not transferred yet, 1: LISTED - Auction pending and open to bids, 2: CANCELED - Auction was canceled, 3: SOLD - Auction has been sold, 4: INVALID - Auction ended but no bid was made) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "bidder", - "in": "query", - "description": "Filter by auctions with this bidder", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "participant", - "in": "query", - "description": "Filter by auctions where this account participated and can still claim / bid", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "max_assets", - "in": "query", - "description": "Max assets per listing", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "min_assets", - "in": "query", - "description": "Min assets per listing", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "show_seller_contracts", - "in": "query", - "description": "If false no seller contracts are shown except if they are in the contract whitelist", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "contract_whitelist", - "in": "query", - "description": "Show these accounts even if they are contracts", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "seller_blacklist", - "in": "query", - "description": "Dont show listings from these sellers (Split multiple with \",\")", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "buyer_blacklist", - "in": "query", - "description": "Dont show listings from these buyers (Split multiple with \",\")", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "asset_id", - "in": "query", - "description": "Asset id in the offer", - "required": false, - "schema": { - "type": "int" - } - }, - { - "name": "marketplace", - "in": "query", - "description": "Filter by all sales where a certain marketplace is either taker or maker marketplace - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "maker_marketplace", - "in": "query", - "description": "Maker marketplace - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "taker_marketplace", - "in": "query", - "description": "Taker marketplace - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Filter by symbol", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "account", - "in": "query", - "description": "Filter accounts that are either seller or buyer", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "seller", - "in": "query", - "description": "Filter by seller - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "buyer", - "in": "query", - "description": "Filter by buyer - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "min_price", - "in": "query", - "description": "Lower price limit", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "max_price", - "in": "query", - "description": "Upper price limit", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "min_template_mint", - "in": "query", - "description": "Min template mint", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "max_template_mint", - "in": "query", - "description": "Max template mint", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "owner", - "in": "query", - "description": "Filter by owner", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter by burned", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for input in asset name on template data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_immutable_name", - "in": "query", - "description": "Search for input in asset name on asset immutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_mutable_name", - "in": "query", - "description": "Search for input in asset name on asset mutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Check if asset is transferable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Check if asset is burnable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created", - "updated", - "ending", - "auction_id", - "price", - "template_mint" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Auction" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/auctions/{auction_id}": { - "get": { - "tags": [ - "auctions" - ], - "summary": "Get a specific auction by id", - "parameters": [ - { - "in": "path", - "name": "auction_id", - "description": "Auction Id", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Auction" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/auctions/{auction_id}/logs": { - "get": { - "tags": [ - "auctions" - ], - "summary": "Fetch auction logs", - "parameters": [ - { - "name": "auction_id", - "in": "path", - "description": "ID of auction", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/buyoffers": { - "get": { - "tags": [ - "buyoffers" - ], - "summary": "Get all buyoffers.", - "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", - "parameters": [ - { - "name": "state", - "in": "query", - "description": "Filter by buyoffer state (0: WAITING: Buyoffer created and pending, 1: LISTED - Buyoffer was declined, 2: CANCELED - Buyoffer was canceled, 3: SOLD - Buyoffer has been sold, 4: INVALID - Buyoffer invalid because recipient does not own all assets anymore) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "max_assets", - "in": "query", - "description": "Max assets per listing", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "min_assets", - "in": "query", - "description": "Min assets per listing", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "show_seller_contracts", - "in": "query", - "description": "If false no seller contracts are shown except if they are in the contract whitelist", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "contract_whitelist", - "in": "query", - "description": "Show these accounts even if they are contracts", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "seller_blacklist", - "in": "query", - "description": "Dont show listings from these sellers (Split multiple with \",\")", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "buyer_blacklist", - "in": "query", - "description": "Dont show listings from these buyers (Split multiple with \",\")", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "asset_id", - "in": "query", - "description": "Asset id in the offer", - "required": false, - "schema": { - "type": "int" - } - }, - { - "name": "marketplace", - "in": "query", - "description": "Filter by all sales where a certain marketplace is either taker or maker marketplace - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "maker_marketplace", - "in": "query", - "description": "Maker marketplace - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "taker_marketplace", - "in": "query", - "description": "Taker marketplace - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Filter by symbol", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "account", - "in": "query", - "description": "Filter accounts that are either seller or buyer", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "seller", - "in": "query", - "description": "Filter by seller - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "buyer", - "in": "query", - "description": "Filter by buyer - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "min_price", - "in": "query", - "description": "Lower price limit", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "max_price", - "in": "query", - "description": "Upper price limit", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "min_template_mint", - "in": "query", - "description": "Min template mint", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "max_template_mint", - "in": "query", - "description": "Max template mint", - "required": false, - "schema": { - "type": "number" - } - }, - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "owner", - "in": "query", - "description": "Filter by owner", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter by burned", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for input in asset name on template data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_immutable_name", - "in": "query", - "description": "Search for input in asset name on asset immutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_mutable_name", - "in": "query", - "description": "Search for input in asset name on asset mutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Check if asset is transferable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Check if asset is burnable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created", - "updated", - "buyoffer_id", - "price", - "template_mint" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Buyoffer" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/buyoffers/{buyoffer_id}": { - "get": { - "tags": [ - "buyoffers" - ], - "summary": "Get a specific buyoffer by id", - "parameters": [ - { - "in": "path", - "name": "buyoffer_id", - "description": "Buyoffer Id", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Buyoffer" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/buyoffers/{buyoffer_id}/logs": { - "get": { - "tags": [ - "buyoffers" - ], - "summary": "Fetch buyoffer logs", - "parameters": [ - { - "name": "buyoffer_id", - "in": "path", - "description": "ID of buyoffer", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/marketplaces": { - "get": { - "tags": [ - "marketplaces" - ], - "summary": "Get all registered marketplaces", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Marketplace" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/marketplaces/{marketplace_name}": { - "get": { - "tags": [ - "marketplaces" - ], - "summary": "Get atomicmarket config", - "parameters": [ - { - "in": "path", - "name": "marketplace_name", - "description": "Marketplace name", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Marketplace" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/assets/{asset_id}/sales": { - "get": { - "tags": [ - "assets" - ], - "summary": "Gets price history for a specific asset", - "parameters": [ - { - "in": "path", - "name": "asset_id", - "description": "Asset Id", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "buyer", - "in": "query", - "description": "Buyer", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "seller", - "in": "query", - "description": "Seller", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Token symbol", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "order", - "in": "query", - "description": "Order by time", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "asc" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "sale_id": { - "type": "string" - }, - "auction_id": { - "type": "string" - }, - "buyoffer_id": { - "type": "string" - }, - "price": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "seller": { - "type": "string" - }, - "buyer": { - "type": "string" - }, - "block_time": { - "type": "string" - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/prices/sales": { - "get": { - "tags": [ - "pricing" - ], - "summary": "Gets price history for a template or schema", - "parameters": [ - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Token symbol", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "sale_id": { - "type": "string" - }, - "auction_id": { - "type": "string" - }, - "buyoffer_id": { - "type": "string" - }, - "template_mint": { - "type": "string" - }, - "price": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "block_time": { - "type": "string" - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/prices/sales/days": { - "get": { - "tags": [ - "pricing" - ], - "summary": "Gets price history for a template or schema", - "parameters": [ - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Token symbol", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "average": { - "type": "string" - }, - "median": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "time": { - "type": "string" - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/prices/templates": { - "get": { - "tags": [ - "pricing" - ], - "summary": "Get template price stats", - "parameters": [ - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Token symbol", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "collection_name": { - "type": "string" - }, - "template_id": { - "type": "string" - }, - "average": { - "type": "string" - }, - "median": { - "type": "string" - }, - "suggested_average": { - "type": "string" - }, - "suggested_median": { - "type": "string" - }, - "min": { - "type": "string" - }, - "max": { - "type": "string" - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/prices/assets": { - "get": { - "tags": [ - "pricing" - ], - "summary": "Gets price history for a template or schema", - "parameters": [ - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "owner", - "in": "query", - "description": "Filter by owner", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter by burned", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for input in asset name on template data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_immutable_name", - "in": "query", - "description": "Search for input in asset name on asset immutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_mutable_name", - "in": "query", - "description": "Search for input in asset name on asset mutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Check if asset is transferable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Check if asset is burnable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "authorized_account", - "in": "query", - "description": "Filter for assets the provided account can edit. ", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_offers", - "in": "query", - "description": "Hide assets which are used in an offer", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "median": { - "type": "string" - }, - "average": { - "type": "string" - }, - "suggested_average": { - "type": "string" - }, - "suggested_median": { - "type": "string" - }, - "min": { - "type": "string" - }, - "max": { - "type": "string" - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/stats/collections": { - "get": { - "tags": [ - "stats" - ], - "summary": "Get market collections sorted by volume or listings", - "parameters": [ - { - "name": "symbol", - "in": "query", - "description": "Token Symbol", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "volume", - "listings" - ], - "default": "volume" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "symbol": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - } - } - }, - "results": { - "type": "array", - "items": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "market_fee": { - "type": "number" - }, - "data": { - "type": "object" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - }, - "listings": { - "type": "string" - }, - "volume": { - "type": "string" - }, - "sales": { - "type": "string" - } - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/stats/collections/{collection_name}": { - "get": { - "tags": [ - "stats" - ], - "summary": "Get market collections sorted by volume or listings", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Collection Name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Token Symbol", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "symbol": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - } - } - }, - "results": { - "type": "array", - "items": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "market_fee": { - "type": "number" - }, - "data": { - "type": "object" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - }, - "listings": { - "type": "string" - }, - "volume": { - "type": "string" - }, - "sales": { - "type": "string" - } - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/stats/accounts": { - "get": { - "tags": [ - "stats" - ], - "summary": "Get market collections sorted by volume or listings", - "parameters": [ - { - "name": "symbol", - "in": "query", - "description": "Token Symbol", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "buy_volume", - "sell_volume" - ], - "default": "buy_volume" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "symbol": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - } - } - }, - "results": { - "type": "array", - "items": { - "type": "object", - "properties": { - "account": { - "type": "string" - }, - "buy_volume": { - "type": "string" - }, - "sell_volume": { - "type": "string" - } - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/stats/accounts/{account}": { - "get": { - "tags": [ - "stats" - ], - "summary": "Get market collections sorted by volume or listings", - "parameters": [ - { - "name": "account", - "in": "path", - "description": "Account Name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Token Symbol", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "symbol": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - } - } - }, - "result": { - "type": "array", - "items": { - "type": "object", - "properties": { - "account": { - "type": "string" - }, - "buy_volume": { - "type": "string" - }, - "sell_volume": { - "type": "string" - } - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/stats/schemas/{collection_name}": { - "get": { - "tags": [ - "stats" - ], - "summary": "Get market schemas sorted by volume or listings", - "parameters": [ - { - "name": "collection_name", - "in": "path", - "description": "Collection Name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "symbol", - "in": "query", - "description": "Token Symbol", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "volume", - "listings" - ], - "default": "volume" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "symbol": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - } - } - }, - "results": { - "type": "array", - "items": { - "type": "object", - "properties": { - "schema_name": { - "type": "string" - }, - "listings": { - "type": "string" - }, - "volume": { - "type": "string" - } - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/stats/graph": { - "get": { - "tags": [ - "stats" - ], - "summary": "Get history of volume and", - "parameters": [ - { - "name": "symbol", - "in": "query", - "description": "Token Symbol", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "symbol": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - } - } - }, - "results": { - "type": "array", - "items": { - "type": "object", - "properties": { - "time": { - "type": "string" - }, - "volume": { - "type": "string" - }, - "sales": { - "type": "string" - } - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/stats/sales": { - "get": { - "tags": [ - "stats" - ], - "summary": "Get total sales and volume", - "parameters": [ - { - "name": "symbol", - "in": "query", - "description": "Token Symbol", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "symbol": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - } - } - }, - "results": { - "type": "object", - "properties": { - "volume": { - "type": "string" - }, - "sales": { - "type": "string" - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/config": { - "get": { - "tags": [ - "config" - ], - "summary": "Get atomicmarket config", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "atomicassets_contract": { - "type": "string" - }, - "atomicmarket_contract": { - "type": "string" - }, - "delphioracle_contract": { - "type": "string" - }, - "version": { - "type": "string" - }, - "maker_market_fee": { - "type": "number" - }, - "taker_market_fee": { - "type": "number" - }, - "minimum_auction_duration": { - "type": "integer" - }, - "maximum_auction_duration": { - "type": "integer" - }, - "minimum_bid_increase": { - "type": "number" - }, - "auction_reset_duration": { - "type": "integer" - }, - "supported_tokens": { - "type": "array", - "items": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - } - } - } - }, - "supported_pairs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "listing_symbol": { - "type": "string" - }, - "settlement_symbol": { - "type": "string" - }, - "delphi_pair_name": { - "type": "string" - }, - "invert_delphi_pair": { - "type": "boolean" - } - } - } - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/assets": { - "get": { - "tags": [ - "assets" - ], - "summary": "Fetch assets.", - "description": "You can filter the result by specific asset / template data fields.You can add for example &template_data.rarity=common to only receive results which have an attribute \"rarity\" with the value \"common\". You can query specific asset data by using &immutable_data.rarity=common or &mutable_data.rarity=common .If you want to query a non text type you need to specify it explicitly (defaults to text type) like data:bool.foil=true or data:number.id=4 or data:text.rarity=common. Integers which are defined greater than 32 bit (eg 64 bit) in the schema need to be queried as text.", - "parameters": [ - { - "name": "collection_name", - "in": "query", - "description": "Filter by collection name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "Filter by schema name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "Filter by template id", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Filter for transferable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Filter for burnable assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter for burned assets", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "owner", - "in": "query", - "description": "Filter by owner", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "burned", - "in": "query", - "description": "Filter by burned", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "match", - "in": "query", - "description": "Search for input in asset name on template data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_immutable_name", - "in": "query", - "description": "Search for input in asset name on asset immutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "match_mutable_name", - "in": "query", - "description": "Search for input in asset name on asset mutable data", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "is_transferable", - "in": "query", - "description": "Check if asset is transferable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "is_burnable", - "in": "query", - "description": "Check if asset is burnable", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "only_duplicate_templates", - "in": "query", - "description": "Show only duplicate assets grouped by template", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "has_backed_tokens", - "in": "query", - "description": "Show only assets that are backed by a token", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "authorized_account", - "in": "query", - "description": "Filter for assets the provided account can edit. ", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_whitelist", - "in": "query", - "description": "Filter for multiple template ids split by \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_blacklist", - "in": "query", - "description": "Dont include specific template ids split by \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_templates_by_accounts", - "in": "query", - "description": "Dont templates that are owned by an account", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_offers", - "in": "query", - "description": "Hide assets which are used in an offer", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asset_id", - "minted", - "updated", - "transferred", - "template_mint", - "name", - "suggested_median_price", - "suggested_average_price", - "median_price", - "average_price" - ], - "default": "asset_id" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/undefined" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/assets/{asset_id}": { - "get": { - "tags": [ - "assets" - ], - "summary": "Fetch asset by id", - "parameters": [ - { - "name": "asset_id", - "in": "path", - "description": "ID of asset", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/ListingAsset" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/assets/{asset_id}/stats": { - "get": { - "tags": [ - "assets" - ], - "summary": "Fetch asset stats", - "parameters": [ - { - "name": "asset_id", - "in": "path", - "description": "ID of asset", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "template_mint": { - "type": "integer" - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/assets/{asset_id}/logs": { - "get": { - "tags": [ - "assets" - ], - "summary": "Fetch asset logs", - "parameters": [ - { - "name": "asset_id", - "in": "path", - "description": "ID of asset", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/transfers": { - "get": { - "tags": [ - "transfers" - ], - "summary": "Fetch transfers", - "parameters": [ - { - "name": "account", - "in": "query", - "description": "Notified account (can be sender or recipient) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sender", - "in": "query", - "description": "Transfer sender - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "recipient", - "in": "query", - "description": "Transfer recipient - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "asset_id", - "in": "query", - "description": "only transfers which contain this asset_id - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "only transfers which contain assets of this template - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "only transfers which contain assets of this schema - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_name", - "in": "query", - "description": "only transfers which contain assets of this collection - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_contracts", - "in": "query", - "description": "dont show transfers from or to accounts that have code deployed", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ListingTransfer" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/offers": { - "get": { - "tags": [ - "offers" - ], - "summary": "Fetch offers", - "parameters": [ - { - "name": "account", - "in": "query", - "description": "Notified account (can be sender or recipient) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sender", - "in": "query", - "description": "Offer sender - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "recipient", - "in": "query", - "description": "Offer recipient - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "state", - "in": "query", - "description": "Filter by Offer State (0: PENDING - Offer created and valid, 1: INVALID - Assets are missing because ownership has changed, 2: UNKNOWN - Offer is not valid anymore, 3: ACCEPTED - Offer was accepted, 4: DECLINED - Offer was declined by recipient, 5: CANCELLED - Offer was canceled by sender) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "is_recipient_contract", - "in": "query", - "description": "Filter offers where recipient is a contract", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "asset_id", - "in": "query", - "description": "only offers which contain this asset_id - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "template_id", - "in": "query", - "description": "only offers which contain assets of this template - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "schema_name", - "in": "query", - "description": "only offers which contain assets of this schema - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_name", - "in": "query", - "description": "only offers which contain assets of this collection - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "account_whitelist", - "in": "query", - "description": "Only offers which are sent by one of these accounts", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "account_blacklist", - "in": "query", - "description": "Exclude offers which are sent by one of these accounts", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sender_asset_whitelist", - "in": "query", - "description": "Only offers which contain these assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sender_asset_blacklist", - "in": "query", - "description": "Exclude offers which contain these assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "recipient_asset_whitelist", - "in": "query", - "description": "Only offers which contain these assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "recipient_asset_blacklist", - "in": "query", - "description": "Exclude offers which contain these assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "hide_contracts", - "in": "query", - "description": "dont show offers from or to accounts that have code deployed", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created", - "updated" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ListingOffer" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/offers/{offer_id}": { - "get": { - "tags": [ - "offers" - ], - "summary": "Find offer by id", - "parameters": [ - { - "name": "offer_id", - "in": "path", - "description": "ID of offer", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/ListingOffer" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomicmarket/v1/offers/{offer_id}/logs": { - "get": { - "tags": [ - "offers" - ], - "summary": "Fetch offer logs", - "parameters": [ - { - "name": "offer_id", - "in": "path", - "description": "ID of offer", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomictools/v1/links": { - "get": { - "tags": [ - "links" - ], - "summary": "Get all links", - "parameters": [ - { - "name": "creator", - "in": "query", - "description": "Link Creator", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "claimer", - "in": "query", - "description": "Claimer of the link if it was claimed", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "public_key", - "in": "query", - "description": "Public key which is used to share the assets", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "state", - "in": "query", - "description": "Filter by link state (0: WAITING - Link created but items were not transferred yet, 1: CREATED - Link is pending, 2: CANCELED - Creator canceled link, 3: CLAIMED - Link was claimed, ) - separate multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_blacklist", - "in": "query", - "description": "Hide collections from result. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "collection_whitelist", - "in": "query", - "description": "Show only results from specific collections. Split multiple with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "ids", - "in": "query", - "description": "seperate multiple ids with \",\"", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "lower_bound", - "in": "query", - "description": "lower bound of primary key (value included)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "upper_bound", - "in": "query", - "description": "upper bound of primary key (value excluded)", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "before", - "in": "query", - "description": "Only show results before this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "after", - "in": "query", - "description": "Only show results after this timestamp in milliseconds (value excluded)", - "required": false, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "sort", - "in": "query", - "description": "Column to sort", - "required": false, - "schema": { - "type": "string", - "enum": [ - "created" - ], - "default": "created" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Link" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomictools/v1/links/{link_id}": { - "get": { - "tags": [ - "links" - ], - "summary": "Get a specific link by id", - "parameters": [ - { - "in": "path", - "name": "link_id", - "description": "Link Id", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "$ref": "#/components/schemas/Link" - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomictools/v1/links/{link_id}/logs": { - "get": { - "tags": [ - "links" - ], - "summary": "Fetch link logs", - "parameters": [ - { - "name": "link_id", - "in": "path", - "description": "ID of link", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "page", - "in": "query", - "description": "Result Page", - "required": false, - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "limit", - "in": "query", - "description": "Results per Page", - "required": false, - "schema": { - "type": "integer", - "default": 100 - } - }, - { - "name": "order", - "in": "query", - "description": "Order direction", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "action_whitelist", - "in": "query", - "description": "Action whitelist", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "action_blacklist", - "in": "query", - "description": "Action blacklist", - "required": false, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Log" - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": false - }, - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/atomictools/v1/config": { - "get": { - "tags": [ - "config" - ], - "summary": "Get atomictools config", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "default": true - }, - "data": { - "type": "object", - "properties": { - "atomictools_contract": { - "type": "string" - }, - "atomicassets_contract": { - "type": "string" - }, - "version": { - "type": "string" - } - } - }, - "query_time": { - "type": "integer", - "nullable": true - } - } - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Log": { - "type": "object", - "properties": { - "log_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "data": { - "type": "object" - }, - "txid": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "Asset": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "asset_id": { - "type": "string" - }, - "owner": { - "type": "string" - }, - "name": { - "type": "string" - }, - "is_transferable": { - "type": "boolean" - }, - "is_burnable": { - "type": "boolean" - }, - "template_mint": { - "type": "string" - }, - "collection": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "market_fee": { - "type": "number" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "schema": { - "type": "object", - "properties": { - "schema_name": { - "type": "string" - }, - "format": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - } - } - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "template": { - "type": "object", - "properties": { - "template_id": { - "type": "string" - }, - "max_supply": { - "type": "string" - }, - "issued_supply": { - "type": "string" - }, - "is_transferable": { - "type": "boolean" - }, - "is_burnable": { - "type": "boolean" - }, - "immutable_data": { - "type": "object" - }, - "created_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - } - } - }, - "backed_tokens": { - "type": "array", - "items": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "amount": { - "type": "string" - } - } - } - }, - "immutable_data": { - "type": "object" - }, - "mutable_data": { - "type": "object" - }, - "data": { - "type": "object" - }, - "burned_by_account": { - "type": "string" - }, - "burned_at_block": { - "type": "string" - }, - "burned_at_time": { - "type": "string" - }, - "updated_at_block": { - "type": "string" - }, - "updated_at_time": { - "type": "string" - }, - "transferred_at_block": { - "type": "string" - }, - "transferred_at_time": { - "type": "string" - }, - "minted_at_block": { - "type": "string" - }, - "minted_at_time": { - "type": "string" - } - } - }, - "Collection": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "market_fee": { - "type": "number" - }, - "data": { - "type": "object" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "Schema": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "schema_name": { - "type": "string" - }, - "format": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - } - } - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - }, - "collection": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "market_fee": { - "type": "number" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - } - } - }, - "Template": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "template_id": { - "type": "string" - }, - "max_supply": { - "type": "string" - }, - "issued_supply": { - "type": "string" - }, - "is_transferable": { - "type": "boolean" - }, - "is_burnable": { - "type": "boolean" - }, - "immutable_data": { - "type": "object" - }, - "created_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "scheme": { - "type": "object", - "properties": { - "schema_name": { - "type": "string" - }, - "format": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - } - } - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "collection": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "market_fee": { - "type": "number" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - } - } - }, - "Offer": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "offer_id": { - "type": "string" - }, - "sender_name": { - "type": "string" - }, - "recipient_name": { - "type": "string" - }, - "memo": { - "type": "string" - }, - "state": { - "type": "integer" - }, - "is_sender_contract": { - "type": "boolean" - }, - "is_recipient_contract": { - "type": "boolean" - }, - "sender_assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } - }, - "recipient_assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } - }, - "updated_at_block": { - "type": "string" - }, - "updated_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "Transfer": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "transfer_id": { - "type": "string" - }, - "sender_name": { - "type": "string" - }, - "recipient_name": { - "type": "string" - }, - "memo": { - "type": "string" - }, - "assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "ListingAsset": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "asset_id": { - "type": "string" - }, - "owner": { - "type": "string" - }, - "name": { - "type": "string" - }, - "is_transferable": { - "type": "boolean" - }, - "is_burnable": { - "type": "boolean" - }, - "template_mint": { - "type": "string" - }, - "collection": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "market_fee": { - "type": "number" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "schema": { - "type": "object", - "properties": { - "schema_name": { - "type": "string" - }, - "format": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - } - } - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "template": { - "type": "object", - "properties": { - "template_id": { - "type": "string" - }, - "max_supply": { - "type": "string" - }, - "issued_supply": { - "type": "string" - }, - "is_transferable": { - "type": "boolean" - }, - "is_burnable": { - "type": "boolean" - }, - "immutable_data": { - "type": "object" - }, - "created_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - } - } - }, - "backed_tokens": { - "type": "array", - "items": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "amount": { - "type": "string" - } - } + "in": "query", + "description": "How many items to return at one time (max 100)", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "format": "int32" } - }, - "immutable_data": { - "type": "object" - }, - "mutable_data": { - "type": "object" - }, - "data": { - "type": "object" - }, - "burned_by_account": { - "type": "string" - }, - "burned_at_block": { - "type": "string" - }, - "burned_at_time": { - "type": "string" - }, - "updated_at_block": { - "type": "string" - }, - "updated_at_time": { - "type": "string" - }, - "transferred_at_block": { - "type": "string" - }, - "transferred_at_time": { - "type": "string" - }, - "minted_at_block": { - "type": "string" - }, - "minted_at_time": { - "type": "string" - }, - "sales": { - "type": "array", - "items": { - "type": "object", - "properties": { - "market_contract": { - "type": "string" - }, - "sale_id": { + } + ], + "responses": { + "200": { + "description": "A paged array of pets", + "headers": { + "x-next": { + "description": "A link to the next page of responses", + "schema": { "type": "string" } } - } - }, - "auctions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "market_contract": { - "type": "string" - }, - "auction_id": { - "type": "string" + }, + "content": { + "application\/json": { + "schema": { + "type": "reference", + "target": "Pets" } } } }, - "prices": { - "type": "array", - "items": { - "type": "object", - "properties": { - "average": { - "type": "string" - }, - "market_contract": { - "type": "string" - }, - "max": { - "type": "string" - }, - "median": { - "type": "string" - }, - "min": { - "type": "string" - }, - "sales": { - "type": "string" - }, - "suggested_average": { - "type": "string" - }, - "suggested_median": { - "type": "string" - }, - "token": { - "type": "object", - "properties": { - "token_contract": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_symbol": { - "type": "string" - } - } + "default": { + "description": "unexpected error", + "content": { + "application\/json": { + "schema": { + "type": "reference", + "target": "Error" } } } } } }, - "ListingOffer": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "offer_id": { - "type": "string" - }, - "sender_name": { - "type": "string" - }, - "recipient_name": { - "type": "string" - }, - "memo": { - "type": "string" - }, - "state": { - "type": "integer" - }, - "is_sender_contract": { - "type": "boolean" - }, - "is_recipient_contract": { - "type": "boolean" - }, - "sender_assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ListingAsset" - } - }, - "recipient_assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ListingAsset" - } - }, - "updated_at_block": { - "type": "string" - }, - "updated_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "ListingTransfer": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "transfer_id": { - "type": "string" - }, - "sender_name": { - "type": "string" - }, - "recipient_name": { - "type": "string" - }, - "memo": { - "type": "string" - }, - "assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ListingAsset" - } - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "Sale": { - "type": "object", - "properties": { - "market_contract": { - "type": "string" - }, - "assets_contract": { - "type": "string" - }, - "sale_id": { - "type": "string" - }, - "seller": { - "type": "string" - }, - "buyer": { - "type": "string" - }, - "offer_id": { - "type": "string" - }, - "price": { - "type": "object", - "properties": { - "amount": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" + "post": { + "summary": "Create a pet", + "operationId": "createPets", + "tags": [ + "pets" + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/Pet" } } }, - "listing_price": { - "type": "number" - }, - "listing_symbol": { - "type": "string" - }, - "assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } - }, - "maker_marketplace": { - "type": "string", - "nullable": true - }, - "taker_marketplace": { - "type": "string", - "nullable": true + "required": true + }, + "responses": { + "201": { + "description": "Null response" }, - "collection": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" + "default": { + "description": "unexpected error", + "content": { + "application\/json": { + "schema": { + "type": "reference", + "target": "Error" } - }, - "market_fee": { - "type": "number" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" } } - }, - "state": { - "type": "integer" - }, - "updated_at_block": { - "type": "string" - }, - "updated_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" } } - }, - "Auction": { - "type": "object", - "properties": { - "market_contract": { - "type": "string" - }, - "assets_contract": { - "type": "string" - }, - "auction_id": { - "type": "string" - }, - "seller": { - "type": "string" - }, - "buyer": { - "type": "string", - "nullable": true - }, - "price": { - "type": "object", - "properties": { - "amount": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - } - } - }, - "assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" + } + }, + "\/pets\/{petId}": { + "get": { + "summary": "Info for a specific pet", + "operationId": "showPetById", + "tags": [ + "pets" + ], + "parameters": [ + { + "name": "petId", + "in": "path", + "required": true, + "description": "The id of the pet to retrieve", + "schema": { + "type": "string" } - }, - "bids": { - "type": "array", - "items": { - "type": "object", - "properties": { - "number": { - "type": "integer" - }, - "account": { - "type": "string" - }, - "amount": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - }, - "txid": { - "type": "string" + } + ], + "responses": { + "200": { + "description": "Expected response to a valid request", + "content": { + "application\/json": { + "schema": { + "type": "reference", + "target": "Pet" } } } }, - "maker_marketplace": { - "type": "string", - "nullable": true - }, - "taker_marketplace": { - "type": "string", - "nullable": true - }, - "collection": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" + "default": { + "description": "unexpected error", + "content": { + "application\/json": { + "schema": { + "type": "reference", + "target": "Error" } - }, - "market_fee": { - "type": "number" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" } } - }, - "state": { - "type": "integer" - }, - "end_time": { - "type": "string" - }, - "updated_at_block": { - "type": "string" - }, - "updated_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" } } - }, - "Buyoffer": { - "type": "object", + } + } + }, + "components": { + "schemas": { + "Pet": { + "type": "struct", "properties": { - "market_contract": { - "type": "string" - }, - "assets_contract": { - "type": "string" - }, - "buyoffer_id": { - "type": "string" - }, - "seller": { - "type": "string" - }, - "buyer": { - "type": "string" - }, - "price": { - "type": "object", - "properties": { - "amount": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - } - } - }, - "assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } - }, - "maker_marketplace": { - "type": "string", - "nullable": true - }, - "taker_marketplace": { - "type": "string", - "nullable": true - }, - "collection": { - "type": "object", - "properties": { - "collection_name": { - "type": "string" - }, - "name": { - "type": "string" - }, - "author": { - "type": "string" - }, - "allow_notify": { - "type": "boolean" - }, - "authorized_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "notify_accounts": { - "type": "array", - "items": { - "type": "string" - } - }, - "market_fee": { - "type": "number" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "state": { + "id": { "type": "integer" }, - "memo": { - "type": "string" - }, - "decline_memo": { - "type": "string" - }, - "updated_at_block": { - "type": "string" - }, - "updated_at_time": { - "type": "string" - }, - "created_at_block": { + "name": { "type": "string" }, - "created_at_time": { + "tag": { "type": "string" } } }, - "Marketplace": { - "type": "object", - "properties": { - "marketplace_name": { - "type": "string" - }, - "creator": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } + "Pets": { + "type": "array", + "schema": { + "type": "reference", + "target": "Pet" } }, - "Link": { - "type": "object", + "Error": { + "type": "struct", "properties": { - "tools_contract": { - "type": "string" - }, - "assets_contract": { - "type": "string" - }, - "link_id": { - "type": "string" - }, - "creator": { - "type": "string" - }, - "claimer": { - "type": "string", - "nullable": true - }, - "state": { + "code": { "type": "integer" }, - "public_key": { - "type": "string" - }, - "memo": { - "type": "string" - }, - "txid": { - "type": "string" - }, - "assets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { + "message": { "type": "string" } } } } } -} +} \ No newline at end of file From edf1431da6ab59de62101baef171281d0c855f98 Mon Sep 17 00:00:00 2001 From: Christoph Kappestein Date: Wed, 9 Oct 2024 23:56:58 +0200 Subject: [PATCH 6/6] fix test --- .../openapi/expect/00_openapi.json | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/Transformer/openapi/expect/00_openapi.json b/tests/Transformer/openapi/expect/00_openapi.json index 75812f26..7cded3ce 100644 --- a/tests/Transformer/openapi/expect/00_openapi.json +++ b/tests/Transformer/openapi/expect/00_openapi.json @@ -147,6 +147,20 @@ }, "components": { "schemas": { + "Inline0062e6f7": { + "type": "struct", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, "Pet": { "type": "struct", "properties": { @@ -161,6 +175,13 @@ } } }, + "Inlined62a5ccb": { + "type": "array", + "schema": { + "type": "reference", + "target": "Pet" + } + }, "Pets": { "type": "array", "schema": { @@ -168,6 +189,17 @@ "target": "Pet" } }, + "Inlinee870fe0d": { + "type": "struct", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + } + } + }, "Error": { "type": "struct", "properties": {