-
Notifications
You must be signed in to change notification settings - Fork 30
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
remove support to retrieve schema from URL #457
Conversation
652a031
to
18a19d1
Compare
What about resolving references in the embedded-or-command-returned schema? Will we require bundling for resource JSON schemas? |
@michaeltlombardi yeah, forgot about referenced schema. We should discuss this further. |
@michaeltlombardi actually, I just remembered that the JsonSchema crate has its own built in way to retrieve web referenced schema so this PR is literally only removing it as an option the manifest so I think we're ok |
I mean that, from a guidance perspective, if the concern is either offline-functionality or no-web-calls-on-apply, we should advise authors on whether and when to bundle their schemas. |
@michaeltlombardi with this change, we require schema to be shipped with the resource whether it's embedded or via command. We should recommend that those schema should not use web references as that would mean their resource won't work on some systems that limit outbound connections. |
@SteveL-MSFT One dangling question then: In our docs, we recommend that users reference the well-known properties instead of redefining them, e.g. "_rebootRequested": {
"$ref": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/resource/properties/rebootRequested.json"
} This ensures that users don't accidentally mis-defined the properties. I think we can tell users either that they can reference DSC schemas and subschemas, or that they need to bundle these into their full definition. I prefer the former, for simplicity - but some bundling tools will also find and pull those references in for them, too. |
Referencing schema should still be recommended and this change shouldn't affect that. This should only affect having the |
This change removes the `url` option for defining the resource instance schema in a resource manifest, as that option was removed in PowerShell#457.
This change removes the `url` option for defining the resource instance schema in a resource manifest, as that option was removed in PowerShell#457.
This change removes the `url` option for defining the resource instance schema in a resource manifest, as that option was removed in PowerShell#457.
This change removes the `url` option for defining the resource instance schema in a resource manifest, as that option was removed in PowerShell#457.
PR Summary
The support for schema URL was initially intended for intellisense support. However, we can still resolve resources for intellisense using existing other means to get the json schema. We should not allow reaching out to internet during configuration deployment.
PR Context