Skip to content

Commit c24ba43

Browse files
authored
Merge pull request #309 from Dorthu/stackscript-script-spec-exstension
Add x-linode-cli-format spec extension
2 parents 35a3c71 + c212ef2 commit c24ba43

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ Attribute | Location | Type | Supported By | Explanation
4444
`x-linode-grant` | method | string | | The level of access a user must have in order to call this endpoint.
4545
`x-linode-cli-display` | schema properties | integer | linode-cli | If truthy, this property will be displayed in the Linode CLI. The numeric value determines the ordering of the displayed columns, left to right.
4646
`x-linode-cli-color` | schema properties | object | linode-cli | A mapping of possible property values to color codes understood by python's [colorclass module](https://pypi.python.org/pypi/colorclass). Must include a `default_`, used for any value that doesn't match one of the keys.
47+
`x-linode-cli-format` | schema properties | string | linode-cli | Overrides the value of the "format" field for this property, but for the CLI only. Valid values are `file` and `json`.
4748
`x-linode-cli-command` | path | string | linode-cli | The command group the methods of this path fall into when generating commands in the `linode-cli <command> <action>` format.
4849
`x-linode-cli-action` | method | string | linode-cli | The action this method will be mapped to when generating commands in the `linode-cli <command> <action>` format.
4950
`x-linode-cli-skip` | method | boolean | linode-cli | If true, the CLI will not expose this action.
5051
`x-linode-redoc-load-ids`| operation | boolean | If true, ReDoc will load this path and print a bulleted list of IDs. This only works on public collections.
5152
`x-linode-ref-name`| keyword | string | [Linode Developer's Site](https://github.com/linode/developers) | Provides a mechanism by which the Developer's site can generate a dropdown menu with an Object's name when using the `oneOf` keyword with a `discriminator`. **Note**: This front end functionality is currently being developed.
52-
`x-linode-cli-rows`| media type | array | A list of JSON paths where the CLI can find the value it should treat as table rows. Only needed for irregular endpoints.
53-
`x-linode-cli-use-schema` | media type | schema or $ref | The schema the CLI should use when showing a row for this response. Use with `x-linode-cli-rows`.
54-
`x-linode-cli-nested-list` | media type | string | The name of the property defined by this response body's schema that is a nested list. Items in the list will be broken out into rows in the CLI's output.
53+
`x-linode-cli-rows`| media type | array | linode-cli | A list of JSON paths where the CLI can find the value it should treat as table rows. Only needed for irregular endpoints.
54+
`x-linode-cli-use-schema` | media type | schema or $ref | linode-cli | The schema the CLI should use when showing a row for this response. Use with `x-linode-cli-rows`.
55+
`x-linode-cli-nested-list` | media type | string | linode-cli | The name of the property defined by this response body's schema that is a nested list. Items in the list will be broken out into rows in the CLI's output.

openapi.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16197,6 +16197,7 @@ components:
1619716197
example: 6
1619816198
disks:
1619916199
type: array
16200+
x-linode-cli-format: json
1620016201
description: >
1620116202
This Node Pool's custom disk layout. Each item in this array will create a new disk
1620216203
partition for each node in this Node Pool.
@@ -18216,6 +18217,7 @@ components:
1821618217
The script to execute when provisioning a new Linode with this StackScript.
1821718218
example: >
1821818219
"#!/bin/bash"
18220+
x-linode-cli-format: file
1821918221
user_defined_fields:
1822018222
type: array
1822118223
description: >

0 commit comments

Comments
 (0)