-
Notifications
You must be signed in to change notification settings - Fork 1
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
Is it impossible to update view when I change nested object? #16
Comments
oh, sorry
Guess i have to use tools like https://github.com/APIDevTools/json-schema-ref-parser |
Hey @remigailard80, exactly! That's the one we're using, too! Not sure if this is immediately helpful to you, but this is what we're doing for our components: /* eslint-disable import/no-dynamic-require */
const $RefParser = require('json-schema-ref-parser');
const merge = require('json-schema-merge-allof');
const { root } = require('./utils');
const { schemaResolver } = require(`${root}/scripts/schemaResolver`);
const schemaLoader = async (refParser, schemaPath) =>
refParser.dereference(schemaPath, {
resolve: {
rm: {
order: 1,
...schemaResolver,
},
},
});
const dereference = async (schemaPath) => {
const schema = await schemaLoader(new $RefParser(), schemaPath);
return merge(schema, { ignoreAdditionalProperties: true });
};
module.exports = {
dereference,
}; Let me know if this solves it for you! |
thank you for this nice stuff! |
Guess When I change values on Json editor and saw it on console, the result look above. But when i change the part
to
it works fine. |
But strangely, when I reproduce same situation on it didn't works fine, and on Although I'm not good at programming, I hope it helps a little bit. |
Oh, it sure does! I wasn't actually aware that you were using the Do you use them for something specific? Because I think without those it probably should work! |
I think I can organize the cases as follows. On the above test case
and other examples are wrapped by
not works neither wrapping case or not wrapping case. In my project
As you mentioned, wrapping the But changing
has effects. Conclusion : not wrapping the |
Thanks a lot for the thorough analysis! Let me see if we can just change 3. That should work for you, then, right? |
Yes! sorry for late reply. |
Okay, I'll see to make that fix :) |
@julrich WAs this ever fixed? I'm attempting to use this to format a storybook for a a complex dereferenced json schema based setup but whenever I try to change internal fields it doesn't end up working. Doesn't work with simple objects or objects in arrays |
Hey @kenisteward. I'll have to check in with a colleague of mine. But we did update this addon for Storybook 7 compatibility. Maybe we fixed something there! @lmestel do you know? I'll have to re-read the issue convo myself, because it's been quite a while. |
@kenisteward can you add which version you are currently on? |
@julrich This shows as the currently marked latest on npm registry as well. |
Hi everyone 👋 |
Let us know if anything remains, here. Happy to help the transition, if needed! Will close this in the near future, otherwise! |
I'm sorry I'm just seeing these updates. Will update my stuff and get back
to you
Thanks for your work!
…On Wed, Apr 10, 2024, 7:43 AM Jonas Ulrich ***@***.***> wrote:
Let us know if anything remains, here. Happy to help the transition, if
needed! Will close this in the near future, otherwise!
—
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADB4XNNGJZU2W6QPDKZNI53Y4UXYTAVCNFSM5RIGUIMKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBUG42DIMRXGM2Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@kenisteward no worries, and if there's something problematic... a new issue would probably be best anyways (could link this one, then). |
https://www.kickstartds.com/storybook/?path=/story/base-header--default
in this example, when I change
to
it looks like there's not any changes.
generated schema, and It looks like every
ref
objects read asanything
.The text was updated successfully, but these errors were encountered: