add description to all compose-spec.json attributes#782
add description to all compose-spec.json attributes#782glours merged 1 commit intocompose-spec:mainfrom
Conversation
|
@rcjsuen if you want to take a look also |
e4f44b6 to
8020eb6
Compare
| "weight": { | ||
| "type": ["integer", "string"], | ||
| "description": "Block IO weight (relative weight) for the service, between 10 and 1000." |
There was a problem hiding this comment.
- I was able to set this value to
0. Is that intentional? - Should we set a
minimumandmaximumfor this similar tocpu_percent?
There was a problem hiding this comment.
I keep this one for a follow up PR
| }, | ||
| "mem_swappiness": { | ||
| "type": ["integer", "string"], | ||
| "description": "Container memory swappiness as percentage (0 to 100)." |
There was a problem hiding this comment.
| "description": "Container memory swappiness as percentage (0 to 100)." | |
| "description": "Container memory swappiness as a percentage (0 to 100)." |
Should we set a minimum and maximum here? I was able to set this value to -1 but Docker Compose still seemed to work. 🤔
There was a problem hiding this comment.
I guess there are many places where such min/max could be defined. We should consider adding them as a follow-up
There was a problem hiding this comment.
Yep, we'll do follow-up PR to manage this kind of improvement
| "count": { | ||
| "type": ["string", "integer"], | ||
| "description": "Number of GPUs to use." |
There was a problem hiding this comment.
Should we specify a minimum value here?
| "driver": { | ||
| "type": "string", | ||
| "description": "Specify which driver should be used for this network. Default is 'bridge'." |
There was a problem hiding this comment.
Should we declare the default attribute here?
| "description": "A dictionary mapping keys to values.", | ||
| "patternProperties": { | ||
| ".+": { | ||
| "type": ["string", "number", "boolean", "null"] | ||
| "type": ["string", "number", "boolean", "null"], | ||
| "description": "Value for the key, which can be a string, number, boolean, or null." |
There was a problem hiding this comment.
Could someone help clarify to me as to why we allow a key to be null? 🤔
There was a problem hiding this comment.
key only (no value) means "use same value from host env variables, and if not set remove variable"
| "rate": { | ||
| "type": ["integer", "string"], | ||
| "description": "Rate limit in bytes per second or IO operations per second." |
There was a problem hiding this comment.
Should we set a minimum for this attribute?
| "weight": { | ||
| "type": ["integer", "string"], | ||
| "description": "Relative weight for the device, between 10 and 1000." |
There was a problem hiding this comment.
Should we set a minimum and maximum for this attribute?
8020eb6 to
d3f0e2a
Compare
| }, | ||
| "mem_swappiness": { | ||
| "type": ["integer", "string"], | ||
| "description": "Container memory swappiness as percentage (0 to 100)." |
There was a problem hiding this comment.
I guess there are many places where such min/max could be defined. We should consider adding them as a follow-up
| "failure_action": { | ||
| "type": "string", | ||
| "description": "Action to take if a rollback fails: 'continue', 'pause'." |
There was a problem hiding this comment.
only exists for swarm mode, low priority imho
| "description": "A dictionary mapping keys to values.", | ||
| "patternProperties": { | ||
| ".+": { | ||
| "type": ["string", "number", "boolean", "null"] | ||
| "type": ["string", "number", "boolean", "null"], | ||
| "description": "Value for the key, which can be a string, number, boolean, or null." |
There was a problem hiding this comment.
key only (no value) means "use same value from host env variables, and if not set remove variable"
it will give more details to Language Server Protocol tools Signed-off-by: Guillaume Lours <[email protected]>
a48bc5b to
3977667
Compare
No problem. Makes sense to me. 👍 |
it will give more details to Language Server Protocol tools
https://docker.atlassian.net/browse/APCLI-1107
Fix compose-spec/compose-spec#138