Skip to content

Perfect json content - #646

Merged
mrunalp merged 1 commit into
opencontainers:masterfrom
zhouhao3:json-test
Jan 11, 2017
Merged

Perfect json content#646
mrunalp merged 1 commit into
opencontainers:masterfrom
zhouhao3:json-test

Conversation

@zhouhao3

Copy link
Copy Markdown

Signed-off-by: zhouhao zhouhao@cn.fujitsu.com

@zhouhao3
zhouhao3force-pushed the json-test branch 2 times, most recently from b0228e5 to 1bd1fe3CompareJanuary 5, 2017 06:17
Comment threadspecs-go/config.go Outdated
Mounts []Mount `json:"mounts,omitempty"`
// Hooks configures callbacks for container lifecycle events.
Hooks Hooks `json:"hooks"`
Hooks Hooks `json:"hooks,omitempty"`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is covered in #427.

Comment threadspecs-go/state.go
BundlePath string `json:"bundlePath"`
// Annotations are the annotations associated with the container.
Annotations map[string]string `json:"annotations"`
Annotations map[string]string `json:"annotations,omitempty"`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The in-flight #507 is adding the associated REQUIRED and OPTIONAL wording to runtime.md.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it is optional, it should not be so modified?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding omitempty (as you do here and as #507 does not do) makes sense. Adding REQUIRED/OPTIONAL to the Markdown spec (as #507 does and you do not do here) also makes sense. Once both PRs land, we'll be in the right place ;).

Comment threadschema/config-linux.json Outdated
}
}
},
"required": [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indent. Try running make fmt from the schema directory.

Comment threadschema/config-schema.json Outdated
"type": "object",
"required": [
"uid",
"gid"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are only required on Linux/Solaris, and there's no way to enforce that constraint in JSON Schema without some serious oneOf hoop-jumping.

Comment threadschema/config-schema.json Outdated
"process",
"root",
"mounts",
"hooks"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing hooks is covered by the in-flight #427.

Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
@crosbymichael

crosbymichael commented Jan 11, 2017

Copy link
Copy Markdown
Member

LGTM

Approved with PullApprove

@RobDolinMSRobDolinMS added this to the 1.0.0 milestone Jan 11, 2017
@mrunalp

mrunalp commented Jan 11, 2017

Copy link
Copy Markdown
Contributor

LGTM

Approved with PullApprove

@mrunalp
mrunalp merged commit a3dd52f into opencontainers:masterJan 11, 2017
@zhouhao3
zhouhao3 deleted the json-test branch January 12, 2017 02:35
@vbattsvbatts mentioned this pull request Jan 27, 2017
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@zhouhao3@crosbymichael@mrunalp@wking@RobDolinMS