Allow extension fields in the v3.4 version of the compose format - #452
Conversation
1d865c6 to
569050b
Compare
|
Is that preferable to a single, named top level section, like |
|
They are definitely inspired by css extensions. While they were annoying to use, I think they served their purpose in that it allowed browsers to experiment with features, and features that became popular were eventually incorporated into the official standard (I believe). We could have a single pre-defined key instead of a pattern. Maybe If the concern is documentation, we could document a single |
|
Can this also be added for 2.x config files? |
Signed-off-by: Daniel Nephin <dnephin@docker.com>
569050b to
2a1857e
Compare
Codecov Report
@@ Coverage Diff @@
## master #452 +/- ##
==========================================
- Coverage 47.02% 47.01% -0.01%
==========================================
Files 198 198
Lines 16336 16334 -2
==========================================
- Hits 7682 7680 -2
Misses 8260 8260
Partials 394 394 |
cpuguy83
left a comment
There was a problem hiding this comment.
LGTM.
It makes sense to have an easy way to have the yaml parser ignore some piece of data.
I'm not sure it's worth it to add a top-level key to namespace these objects.
Would definitely like to hear other maintianers feedback.
|
I like the way it's done now, so you can have extra keys close to the object they relate to. |
|
Let the trumpets play! |
|
Any input on getting this added for 2.x version files? It shouldn't be a breaking change. My company is not able at this time to use 3.x files, but would really like to have this ability. |
|
@tbeadle Yes, it's in our plans 👍 |
|
winning |
As said here: moby/moby#31101 (comment) - I'd also have preferred another syntax, ie. |
|
|
…36247 [18.03] Fix to address regression caused by PR 30897
This has been a long requested feature (see docker/compose#2942 and many duplicated issues).
Any top-level key which starts with
x-will be ignored by compose. This allows for users to:This matches a similar feature in the swagger spec definition: https://swagger.io/specification/#specificationExtensions
cc @shin- I'd like to make sure this is consistent with the next version of the v2.x format, so please comment if you think this is not appropriate