Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Allow extending the schema #209

Closed
ernoaapa opened this issue Mar 24, 2018 · 2 comments
Closed

Allow extending the schema #209

ernoaapa opened this issue Mar 24, 2018 · 2 comments

Comments

@ernoaapa
Copy link

Hi,
I'm building RaspberryPI3 images with linuxkit through linuxkit-server.
To make building the sdcard as easy as possible, I added to linuxkit-server capability to request the output in img-file what users can easily flash to sd-card for example with dd.

I would like to build support for defining disk partitions in the linuxkit yaml-file, but cannot because linuxkit build fails because it doesn't allow any extra fields to exist in the yaml-file.

My options are:

  1. Change moby/tool schema to allow extra fields (change here additionalProperties=true)
  2. unmarshal yaml, drop extra fields, marshal back to []byte and call Moby
  3. Something else?

It's quite common for example in JSON APIs to ignore extra fields, so maybe also, in this case, it make sense. What do you think? It would allow the community to build extra features on top of Moby/Linuxkit what is not suitable to be merged into the core.

@justincormack
Copy link
Collaborator

justincormack commented Mar 24, 2018 via email

@ernoaapa
Copy link
Author

Validation sounds like a good reason and because of that, made me think that maybe it's good to keep it as it is. I just need to find a way, how can I drop the extra property before I pass the yaml bytes to the moby.Build.

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

No branches or pull requests

2 participants