unified stringPointer for *string#548
unified stringPointer for *string#548Mashimiao wants to merge 1 commit intoopencontainers:masterfrom
Conversation
schema/config-linux.json
Outdated
| "properties": { | ||
| "pageSize": { | ||
| "type": "string" | ||
| "$ref": "defs.json#/definitions/stringPointer" |
There was a problem hiding this comment.
This is a bit sticky, since the Markdown has pageSize as required but the Go has it as a pointer. I don't see the point of declaring hugepageLimits without setting both (in which case I don't think they should be pointers in either Go or JSON Schema), but I haven't read enough of the history to say for sure.
There was a problem hiding this comment.
@wking
Well, I'm a little confused about types in specs-go.
As you mentioned, pagesize is required, but it is declared as a pointer in GO.
As Namespace's property Path is optional, but it is declared as string type in GO.
So, is there is unified standard to indicate optional or required in GO?
|
@Mashimiao do you have a case where the JSON value for the cgrouppath is |
|
On Tue, Aug 30, 2016 at 10:33:23AM -0700, Vincent Batts wrote:
cgroupsPath is optional 1, and for most (all?) of our optional |
|
On Thu, Sep 29, 2016 at 01:43:56AM -0700, Ma Shimiao wrote:
If it's required, I think it should not be a pointer in Go, and that
This is less cut and dried. The current policy is in 1, and for |
2a98953 to
358a56d
Compare
Signed-off-by: Ma Shimiao <[email protected]>
|
@wking @opencontainers/runtime-spec-maintainers PTAL |
Signed-off-by: Ma Shimiao [email protected]