diff --git a/composer.json b/composer.json index 58597a3..5135232 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 4006540..e050f23 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 2157aa5..12c69e3 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 261d096..d978050 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 e924a5f..29594d0 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 9f6ffec..1fa85db 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 52426b8..ab81566 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 a81ac60..f60cc5c 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 edc11a1..b960d31 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 47b1443..89d7e72 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 f78180c..802137a 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 c2ccbce..c86e7b8 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 b32a002..8a084ef 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 de711ed..7516c0b 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 ccd3fd5..79ca0be 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 e536379..c20668f 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 41a677a..6eb183b 100644 --- a/src/Parser/Attribute.php +++ b/src/Parser/Attribute.php @@ -33,11 +33,9 @@ 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; @@ -46,13 +44,7 @@ use PSX\Schema\Parser\ContextInterface; 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; /** @@ -262,7 +254,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 +264,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 +503,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 f05f297..945d8ec 100644 --- a/src/Parser/OpenAPI.php +++ b/src/Parser/OpenAPI.php @@ -54,18 +54,17 @@ 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; use PSX\Schema\SchemaInterface; use PSX\Schema\SchemaManagerInterface; use PSX\Schema\SchemaTraverser; -use PSX\Schema\Type\ArrayType; -use PSX\Schema\Type\IntersectionType; -use PSX\Schema\Type\MapType; -use PSX\Schema\Type\ReferenceType; -use PSX\Schema\Type\StructType; -use PSX\Schema\Type\UnionType; +use PSX\Schema\Type\DefinitionTypeAbstract; +use PSX\Schema\Type\Factory\PropertyTypeFactory; +use PSX\Schema\Type\PropertyTypeAbstract; +use PSX\Schema\Type\ReferencePropertyType; use PSX\Schema\TypeFactory; use PSX\Schema\TypeInterface; use PSX\Schema\Visitor\TypeVisitor; @@ -275,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)); } } @@ -299,7 +298,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,10 +306,7 @@ 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); } } @@ -371,8 +367,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) { @@ -384,9 +381,12 @@ private function getSchemaFromMediaTypes(MediaTypes $mediaTypes): ?TypeInterface return null; } - $type = $this->schemaParser->parseType($schema); - - return $this->transformInlineStruct($type); + try { + return $this->schemaParser->parsePropertyType($schema); + } catch (UnknownTypeException $e) { + $type = $this->schemaParser->parseDefinitionType($schema); + return $this->transformInlineStruct($type); + } } /** @@ -395,42 +395,16 @@ private function getSchemaFromMediaTypes(MediaTypes $mediaTypes): ?TypeInterface * * @throws InvalidSchemaException */ - private function transformInlineStruct(TypeInterface $type): TypeInterface + private function transformInlineStruct(DefinitionTypeAbstract $type): PropertyTypeAbstract { - if ($type instanceof StructType) { - // 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); + // 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); + if (!$this->definitions->hasType($typeName)) { $this->definitions->addType($typeName, $type); - - return TypeFactory::getReference($typeName); - } elseif ($type instanceof MapType) { - $child = $type->getAdditionalProperties(); - if ($child instanceof TypeInterface) { - $r = $this->transformInlineStruct($child); - return TypeFactory::getMap($r); - } - } elseif ($type instanceof ArrayType) { - $child = $type->getItems(); - if ($child instanceof TypeInterface) { - $r = $this->transformInlineStruct($child); - 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; + return PropertyTypeFactory::getReference($typeName); } private function resolveReference(string $reference) diff --git a/src/Parser/TypeAPI.php b/src/Parser/TypeAPI.php index 22985e0..0232cb9 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/src/Transformer/OpenAPI.php b/src/Transformer/OpenAPI.php index 3a5042a..f9088f9 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->{'$ref'}]; + $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/ApiManagerTest.php b/tests/ApiManagerTest.php index b738109..ed64c1b 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 bceb8dd..277b8e5 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 5582763..ee56c31 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 8319a6a..4d33244 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 d2c2c5b..41f34f4 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 96af289..fb2ddff 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 c42b855..43abb95 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 14cdf7c..4d8487c 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 b606048..340209c 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 1a7f995..829472b 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 2e117a4..3cb3e43 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 94b1813..a55a14f 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 cab6d28..6cb8841 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 01437af..862bce6 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 bd22b11..f79c75e 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 b50aaa0..9cd75df 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 1f8e50b..b7893c5 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 ec66486..ba35a58 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 102bbf9..2b48203 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 3c733c2..eecb5a7 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 d901ed0..8be6551 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 984816c..92b8893 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 93b7f79..1480b8b 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 b50aaa0..9cd75df 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 1f8e50b..b7893c5 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 ec66486..ba35a58 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 3c733c2..eecb5a7 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 f50ce9c..6eb1744 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 bd410ba..65f1c75 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 6b48faa..0a44959 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 659d10f..b0d9011 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 7c38e0c..daea58e 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 f560e24..0a77195 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 c32840c..a4a837c 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; @@ -57,50 +60,44 @@ protected function getSpecification(): SpecificationInterface $operation = $builder->addOperation('get', 'GET', '/foo/:name/:type', 200, $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->addArgument('args', ArgumentInterface::IN_QUERY, PropertyTypeFactory::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('name', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString()); + $operation->addArgument('type', ArgumentInterface::IN_PATH, PropertyTypeFactory::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 = $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($update)); $operation->addThrow(400, $message); - $operation->addThrow(500, TypeFactory::getMap($message)); + $operation->addThrow(500, PropertyTypeFactory::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('name', ArgumentInterface::IN_PATH, PropertyTypeFactory::getString()); + $operation->addArgument('type', ArgumentInterface::IN_PATH, PropertyTypeFactory::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 = $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($patch)); $operation->addThrow(400, $message); - $operation->addThrow(500, TypeFactory::getArray($message)); + $operation->addThrow(500, PropertyTypeFactory::getArray($message)); return $builder->getSpecification(); } @@ -127,7 +124,7 @@ protected function getSpecificationCollection(): SpecificationInterface $operation = $builder->addOperation('bar.find', 'GET', '/bar/:foo', 200, $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->setTags(['bar']); @@ -136,7 +133,7 @@ protected function getSpecificationCollection(): SpecificationInterface $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', TypeFactory::getString()); + $operation->addArgument('year', 'path', PropertyTypeFactory::getString()); $operation = $builder->addOperation('foo.baz.create', 'POST', '/bar/$year<[0-9]+>', 201, $message); $operation->setTags(['baz']); @@ -145,24 +142,6 @@ protected function getSpecificationCollection(): SpecificationInterface 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); - - return $builder->getSpecification(); - } - protected function getSpecificationTest(): SpecificationInterface { $builder = $this->apiManager->getBuilder(); @@ -173,9 +152,9 @@ protected function getSpecificationTest(): SpecificationInterface $operation = $builder->addOperation('product.getAll', 'GET', '/anything', 200, $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->setDescription('Creates a new product'); @@ -184,17 +163,17 @@ protected function getSpecificationTest(): SpecificationInterface $operation = $builder->addOperation('product.update', 'PUT', '/anything/:id', 200, $testResponse); $operation->setDescription('Updates an existing product'); - $operation->addArgument('id', 'path', TypeFactory::getInteger()); + $operation->addArgument('id', 'path', PropertyTypeFactory::getInteger()); $operation->addArgument('payload', 'body', $testRequest); $operation = $builder->addOperation('product.patch', 'PATCH', '/anything/:id', 200, $testResponse); $operation->setDescription('Patches an existing product'); - $operation->addArgument('id', 'path', TypeFactory::getInteger()); + $operation->addArgument('id', 'path', PropertyTypeFactory::getInteger()); $operation->addArgument('payload', 'body', $testRequest); $operation = $builder->addOperation('product.delete', 'DELETE', '/anything/:id', 200, $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->setDescription('Test binary content type'); @@ -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): ReferencePropertyType { $result = $this->schemaManager->getSchema($schema); $builder->addDefinitions($result->getDefinitions()); - return $result->getType(); + return PropertyTypeFactory::getReference($result->getRoot()); } } diff --git a/tests/Generator/Markup/resource/client.md b/tests/Generator/Markup/resource/client.md index 5d0d879..bc01d9d 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 67a81c3..070c62e 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 b521927..d0fcebc 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 117e6f1..7ae4f31 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 b3c31da..0000000 --- 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 23930a3..c2e0dcb 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 60ddee8..bd73ded 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 bf6bc89..8fcb6b8 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 65d14ca..0b6d92e 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 1f2f241..7f05a40 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 e9ee19f..339fb38 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 dda752c..036bc57 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 2422a5d..96dec14 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 d403db4..d189fed 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 0b22eb6..84a51cb 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 e9ee19f..339fb38 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 dda752c..036bc57 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 6c1de0a..0bd2d24 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 b50aaa0..9cd75df 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 1f8e50b..b7893c5 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 ec66486..ba35a58 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 102bbf9..2b48203 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 3c733c2..eecb5a7 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 d901ed0..8be6551 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 984816c..92b8893 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 b50aaa0..9cd75df 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 1f8e50b..b7893c5 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 ec66486..ba35a58 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 3c733c2..eecb5a7 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 c2662b7..39bdfdd 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 950c392..8ca8f29 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 c171cc7..531e293 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 a79e96c..3eca45b 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 300a351..b40d3b0 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 dc0844b..9617bc6 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 7b64b23..44bf5c9 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/Inspector/DevLifterTest.php b/tests/Inspector/DevLifterTest.php index f7aac74..50f4f14 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/Attribute/TestController.php b/tests/Parser/Attribute/TestController.php index 140a4d9..c836bad 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 5a028ff..95f33d6 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 328b466..f4b18f5 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()); } @@ -92,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/Parser/ParserTestCase.php b/tests/Parser/ParserTestCase.php index e4a278d..7f0c9b0 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; } diff --git a/tests/Transformer/OpenAPITest.php b/tests/Transformer/OpenAPITest.php index 137d49c..ee3cbac 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 77f53b5..27156a2 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 03e6d46..7cded3c 100644 --- a/tests/Transformer/openapi/expect/00_openapi.json +++ b/tests/Transformer/openapi/expect/00_openapi.json @@ -1,10360 +1,215 @@ { - "openapi": "3.0.3", + "openapi": "3.0.0", "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)", - "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": { - "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": { - "$ref": "Inline7013859f" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline2ea55b59" - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline20d1dd35" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline3fd53df7" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inlinecae37d48" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inlineb3b9967c" - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline28cb2593" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline3fd53df7" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline2734e4b8" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inlinea2fe30b0" - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline1b899a72" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline3fd53df7" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline1a1c0c3e" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inlined7b3950c" - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inlineacc80e6b" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline3fd53df7" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline636db0a6" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inlinec16cb6b4" - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline3fd53df7" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline311842ae" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inlineffeae89e" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inlineb948cb9b" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline87e7e216" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inlineffeae89e" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inlined52801ac" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline1124b387" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline563c4072" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline563c4072" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline4a0559e2" - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline3fd53df7" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline5d957a23" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline07db2bcf" - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline3fd53df7" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline004e82a0" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline0841b879" - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline3fd53df7" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/atomicmarket\/v1\/marketplaces": { - "get": { - "tags": [ - "marketplaces" - ], - "summary": "Get all registered marketplaces", - "responses": { - "200": { - "description": "OK", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline14ab017b" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline0dbc05c9" - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inlineb2e6fd35" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline85a8820c" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline6d90dcea" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline74cdda32" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline4eea33ed" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inlinecbc952ff" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inlinecbc952ff" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline37285df6" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline3e1988f8" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline01d71b58" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline03ec62d9" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inlinee9e8d085" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/atomicmarket\/v1\/config": { - "get": { - "tags": [ - "config" - ], - "summary": "Get atomicmarket config", - "responses": { - "200": { - "description": "OK", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline4f499623" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline96783c6c" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline359f6138" - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline20d1dd35" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline3fd53df7" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline382d5749" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline789aa161" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline2c904cf9" - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline3fd53df7" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inlinedb18d4ba" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline3a3cb959" - } - } - } - }, - "416": { - "description": "Element not found", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/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": { - "$ref": "Inline3fd53df7" - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline2d859569" - } - } - } - } - } - } - }, - "\/atomictools\/v1\/config": { - "get": { - "tags": [ - "config" - ], - "summary": "Get atomictools config", - "responses": { - "200": { - "description": "OK", - "content": { - "application\/json": { - "schema": { - "$ref": "Inline7a0424ea" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Inlinecdb728a8": { - "type": "object", - "properties": [] - }, - "Inline66e31af9": { - "type": "object", - "properties": { - "log_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "data": { - "$ref": "Inlinecdb728a8" - }, - "txid": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "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": { - "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": { - "$ref": "Inline3bac70d7" - }, - "schema": { - "$ref": "Inline15733e28" - }, - "template": { - "$ref": "Inline6db6c0a2" - }, - "backed_tokens": { - "type": "array", - "items": { - "$ref": "Inlinec529777e" - } - }, - "immutable_data": { - "$ref": "Inlinecdb728a8" - }, - "mutable_data": { - "$ref": "Inlinecdb728a8" - }, - "data": { - "$ref": "Inlinecdb728a8" - }, - "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" - } - } - }, - "Asset": { - "$ref": "Inline86faf907" - }, - "Inline916e2892": { - "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" - } - } - }, - "Collection": { - "$ref": "Inline916e2892" - }, - "Inlined10c0cac": { - "type": "object", - "properties": { - "contract": { - "type": "string" - }, - "schema_name": { - "type": "string" - }, - "format": { - "type": "array", - "items": { - "$ref": "Inlineffffa488" - } - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - }, - "collection": { - "$ref": "Inline3bac70d7" - } - } - }, - "Schema": { - "$ref": "Inlined10c0cac" - }, - "Inline8a79a343": { - "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": { - "$ref": "Inlinecdb728a8" - }, - "created_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "scheme": { - "$ref": "Inline15733e28" - }, - "collection": { - "$ref": "Inline3bac70d7" - } - } - }, - "Template": { - "$ref": "Inline8a79a343" - }, - "Inlinebe0f0ae6": { - "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": "Asset" - } - }, - "recipient_assets": { - "type": "array", - "items": { - "$ref": "Asset" - } - }, - "updated_at_block": { - "type": "string" - }, - "updated_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "Offer": { - "$ref": "Inlinebe0f0ae6" - }, - "Inline18f76e5c": { - "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": "Asset" - } - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "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": { - "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": { - "$ref": "Inline3bac70d7" - }, - "schema": { - "$ref": "Inline15733e28" - }, - "template": { - "$ref": "Inline6db6c0a2" - }, - "backed_tokens": { - "type": "array", - "items": { - "$ref": "Inlinec529777e" - } - }, - "immutable_data": { - "$ref": "Inlinecdb728a8" - }, - "mutable_data": { - "$ref": "Inlinecdb728a8" - }, - "data": { - "$ref": "Inlinecdb728a8" - }, - "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": { - "$ref": "Inlinefe4eed04" - } - }, - "auctions": { - "type": "array", - "items": { - "$ref": "Inline36fc3608" - } - }, - "prices": { - "type": "array", - "items": { - "$ref": "Inline94a31c66" - } - } - } - }, - "ListingAsset": { - "$ref": "Inline226ace36" - }, - "Inlinebb1d5faf": { - "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": "ListingAsset" - } - }, - "recipient_assets": { - "type": "array", - "items": { - "$ref": "ListingAsset" - } - }, - "updated_at_block": { - "type": "string" - }, - "updated_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "ListingOffer": { - "$ref": "Inlinebb1d5faf" - }, - "Inlinef7b99d3c": { - "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": "ListingAsset" - } - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "ListingTransfer": { - "$ref": "Inlinef7b99d3c" - }, - "Inlined616ecba": { - "type": "object", - "properties": { - "amount": { - "type": "string" - }, - "token_precision": { - "type": "integer" - }, - "token_contract": { - "type": "string" - }, - "token_symbol": { - "type": "string" - } - } - }, - "Inline19815004": { - "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": { - "$ref": "Inlined616ecba" - }, - "listing_price": { - "type": "number" - }, - "listing_symbol": { - "type": "string" - }, - "assets": { - "type": "array", - "items": { - "$ref": "Asset" - } - }, - "maker_marketplace": { - "type": "string" - }, - "taker_marketplace": { - "type": "string" - }, - "collection": { - "$ref": "Inline3bac70d7" - }, - "state": { - "type": "integer" - }, - "updated_at_block": { - "type": "string" - }, - "updated_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "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": { - "type": "object", - "properties": { - "market_contract": { - "type": "string" - }, - "assets_contract": { - "type": "string" - }, - "auction_id": { - "type": "string" - }, - "seller": { - "type": "string" - }, - "buyer": { - "type": "string" - }, - "price": { - "$ref": "Inlined616ecba" - }, - "assets": { - "type": "array", - "items": { - "$ref": "Asset" - } - }, - "bids": { - "type": "array", - "items": { - "$ref": "Inlinede464a22" - } - }, - "maker_marketplace": { - "type": "string" - }, - "taker_marketplace": { - "type": "string" - }, - "collection": { - "$ref": "Inline3bac70d7" - }, - "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" - } - } - }, - "Auction": { - "$ref": "Inline03fe463c" - }, - "Inlineecb350cd": { - "type": "object", - "properties": { - "market_contract": { - "type": "string" - }, - "assets_contract": { - "type": "string" - }, - "buyoffer_id": { - "type": "string" - }, - "seller": { - "type": "string" - }, - "buyer": { - "type": "string" - }, - "price": { - "$ref": "Inlined616ecba" - }, - "assets": { - "type": "array", - "items": { - "$ref": "Asset" - } - }, - "maker_marketplace": { - "type": "string" - }, - "taker_marketplace": { - "type": "string" - }, - "collection": { - "$ref": "Inline3bac70d7" - }, - "state": { - "type": "integer" - }, - "memo": { - "type": "string" - }, - "decline_memo": { - "type": "string" - }, - "updated_at_block": { - "type": "string" - }, - "updated_at_time": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "Buyoffer": { - "$ref": "Inlineecb350cd" - }, - "Inline3b14cb7e": { - "type": "object", - "properties": { - "marketplace_name": { - "type": "string" - }, - "creator": { - "type": "string" - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "type": "string" - } - } - }, - "Marketplace": { - "$ref": "Inline3b14cb7e" - }, - "Inline91e35da1": { - "type": "object", - "properties": { - "tools_contract": { - "type": "string" - }, - "assets_contract": { - "type": "string" - }, - "link_id": { - "type": "string" - }, - "creator": { - "type": "string" - }, - "claimer": { - "type": "string" - }, - "state": { - "type": "integer" - }, - "public_key": { - "type": "string" - }, - "memo": { - "type": "string" - }, - "txid": { - "type": "string" - }, - "assets": { - "type": "array", - "items": { - "$ref": "Asset" - } - }, - "created_at_block": { - "type": "string" - }, - "created_at_time": { - "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" + "\/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" } - }, - "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" + ], + "responses": { + "200": { + "description": "A paged array of pets", + "headers": { + "x-next": { + "description": "A link to the next page of responses", + "schema": { + "type": "string" + } + } + }, + "content": { + "application\/json": { + "schema": { + "type": "reference", + "target": "Pets" + } + } } - } - } - }, - "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" + "default": { + "description": "unexpected error", + "content": { + "application\/json": { + "schema": { + "type": "reference", + "target": "Error" + } + } } } } }, - "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" + "post": { + "summary": "Create a pet", + "operationId": "createPets", + "tags": [ + "pets" + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/Pet" + } } - } - } - }, - "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" + "required": true + }, + "responses": { + "201": { + "description": "Null response" }, - "results": { - "type": "array", - "items": { - "$ref": "Inline46a855d8" + "default": { + "description": "unexpected error", + "content": { + "application\/json": { + "schema": { + "type": "reference", + "target": "Error" + } + } } } } - }, - "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" + } + }, + "\/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" } } - } - }, - "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" + ], + "responses": { + "200": { + "description": "Expected response to a valid request", + "content": { + "application\/json": { + "schema": { + "type": "reference", + "target": "Pet" + } + } + } }, - "results": { - "$ref": "Inline37541c3f" + "default": { + "description": "unexpected error", + "content": { + "application\/json": { + "schema": { + "type": "reference", + "target": "Error" + } + } + } } } - }, - "Inlinee9e8d085": { - "type": "object", + } + } + }, + "components": { + "schemas": { + "Inline0062e6f7": { + "type": "struct", "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Inlined7926285" - }, - "query_time": { + "id": { "type": "integer" - } - } - }, - "Inlineedc1f8ec": { - "type": "object", - "properties": { - "listing_symbol": { - "type": "string" }, - "settlement_symbol": { + "name": { "type": "string" }, - "delphi_pair_name": { + "tag": { "type": "string" - }, - "invert_delphi_pair": { - "type": "boolean" } } }, - "Inlineeecf236e": { - "type": "object", + "Pet": { + "type": "struct", "properties": { - "atomicassets_contract": { - "type": "string" - }, - "atomicmarket_contract": { - "type": "string" + "id": { + "type": "integer" }, - "delphioracle_contract": { + "name": { "type": "string" }, - "version": { + "tag": { "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" - } + "Inlined62a5ccb": { + "type": "array", + "schema": { + "type": "reference", + "target": "Pet" } }, - "Inline789aa161": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "ListingOffer" - } - }, - "query_time": { - "type": "integer" - } + "Pets": { + "type": "array", + "schema": { + "type": "reference", + "target": "Pet" } }, - "Inline2c904cf9": { - "type": "object", + "Inlinee870fe0d": { + "type": "struct", "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "ListingOffer" - }, - "query_time": { + "code": { "type": "integer" - } - } - }, - "Inlinedb18d4ba": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "type": "array", - "items": { - "$ref": "Link" - } }, - "query_time": { - "type": "integer" + "message": { + "type": "string" } } }, - "Inline3a3cb959": { - "type": "object", + "Error": { + "type": "struct", "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Link" - }, - "query_time": { + "code": { "type": "integer" - } - } - }, - "Inline59b668ab": { - "type": "object", - "properties": { - "atomictools_contract": { - "type": "string" - }, - "atomicassets_contract": { - "type": "string" }, - "version": { + "message": { "type": "string" } } - }, - "Inline7a0424ea": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "data": { - "$ref": "Inline59b668ab" - }, - "query_time": { - "type": "integer" - } - } } } }