Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not create schema reference when deploying #103

Closed
zaniar opened this issue Dec 5, 2017 · 2 comments
Closed

Can not create schema reference when deploying #103

zaniar opened this issue Dec 5, 2017 · 2 comments
Labels

Comments

@zaniar
Copy link

zaniar commented Dec 5, 2017

I have my schema in json file. I want to reference to other schema. So I added the following lines:

"$ref": "schema:///SchemaName"

When I execute deploy command, it gave me message:

An exception occurred during deploy. No changes are applied to the database.

Message: Scheme schema is not supported
Trace: #0 vendor\fusio\impl\src\Service\System\Deploy\Transformer\Schema.php(134): Fusio\Impl\Service\System\Deploy\Transformer\Schema->traverseSchema(Object(stdClass), '...')
#1 vendor\fusio\impl\src\Service\System\Deploy\Transformer\Schema.php(112): Fusio\Impl\Service\System\Deploy\Transformer\Schema->traverseSchema(Object(stdClass), '...')
#2 vendor\fusio\impl\src\Service\System\Deploy\Transformer\Schema.php(80): Fusio\Impl\Service\System\Deploy\Transformer\Schema->resolveRefs('...')
#3 vendor\fusio\impl\src\Service\System\Deploy\Transformer\Schema.php(69): Fusio\Impl\Service\System\Deploy\Transformer\Schema->resolveSchema('!include resour...', '...')
#4 vendor\fusio\impl\src\Service\System\Deploy\Transformer\Schema.php(59): Fusio\Impl\Service\System\Deploy\Transformer\Schema->transformSchema('Unified', '!include resour...', '...')
#5 vendor\fusio\impl\src\Service\System\Deploy.php(95): Fusio\Impl\Service\System\Deploy\Transformer\Schema->transform(Array, Object(stdClass), '...')
#6 vendor\fusio\impl\src\Console\System\DeployCommand.php(109): Fusio\Impl\Service\System\Deploy->deploy(Array, '...')
#7 vendor\symfony\console\Command\Command.php(264): Fusio\Impl\Console\System\DeployCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 vendor\symfony\console\Application.php(874): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 vendor\symfony\console\Application.php(228): Symfony\Component\Console\Application->doRunCommand(Object(Fusio\Impl\Console\System\DeployCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 vendor\symfony\console\Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 bin\fusio(47): Symfony\Component\Console\Application->run()
#12 {main}

I tried the same thing but using the backend app and it worked as expected. No issue at all.

@chriskapp
Copy link
Member

Hi, currently when you deploy a schema only the file:// scheme is allowed to reference another schema. But actually I think it would be good to support also the schema:// scheme. Maybe we add also support for http:// which gets then resolved on deploy.

Initially we have made this limitation because if you use schema:// you must have a specific order of your schemas, so that you import schemas with dependencies at the end. But I think it is better to allow this.

@chriskapp
Copy link
Member

This is now implemented in the v1.0.0-RC5 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants