Skip to content

Conversation

georgantas
Copy link

Issue

A json object was being passed as the config file in the "Sapio CLI" -> "File" settings tab. From the debug, when clicking "Test Sapio-Cli":

[ 'sapio' ] /home/yianni/workspace/sapio/target/release/sapio-cli [
  '--config',
  { config: '/home/yianni/.config/sapio-cli/config.json' },
  'configure',
  'show'
]

Fix

Correct the Json Schema for this tab.

Testing

Clicked "Test Sapio-Cli" and got "success". Also, checked the debug:

[ 'sapio' ] /home/yianni/workspace/sapio/target/release/sapio-cli [
  '--config',
  '/home/yianni/.config/sapio-cli/config.json',
  'configure',
  'show'
]

@JeremyRubin
Copy link
Contributor

Good find! The fix is a problematic -- these schemas are auto-generated from the contrib settings generator, so tweaking them by hand will get broken when they are updated next.

Is there a fix that can go into the codegen?

@georgantas
Copy link
Author

Ohh, I see. Will have another look.

@georgantas georgantas reopened this Apr 15, 2022
@@ -1,431 +1,458 @@
import { JSONSchema7 } from 'json-schema';
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-generated this file with cargo run > ../../src/common/settings_gen.ts. Are you running a lint configuration on it?

@@ -0,0 +1,3 @@
[toolchain]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This package was not compiling with the stable toolchain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants