Skip to content

OPS Schema updates #572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
261 changes: 261 additions & 0 deletions specs/PSCommand.schema-new.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,261 @@
{
"title": "PowershellCmdlet",
"$schema": "https://dotnet.github.io/docfx/schemas/v1.0/schema.json#",
"version": "1.0.0",
"description": "The schema for powershell cmdlet page",
"id": "https://static.docs.com/ui/latest/schemas/PowershellCmdlet.schema.json",
"type": "object",
"additionalProperties": false,
"required": ["name", "module", "uid"], // UID is added by OPS team. will not be included in the YAML generated by New-YamlHelp
"renderType": "content",
"archivable": false,
"properties": {
"applicable": {
"items": {
"type": "string"
},
"minItems": 1,
"type": "array"
},
"description": { // Is this Description? No change. Can code blocks be included here?
"type": "string",
"contentType": "markdown",
"tags": ["localizable"]
},
"examples": {
"items": {
"additionalProperties": false,
"required": ["title", "description"], // We need it to be title and block of markdown, which includes 1 or more code blocks and 0 or more paragraphs
"properties": {
"title": {
"type": "string",
"tags": ["localizable"]
},
"description": {
"type": "string",
"contentType": "markdown",
"tags": ["localizable"]
}
},
"type": "object"
},
"minItems": 1,
"type": "array"
},
"inputs": {
"items": {
"additionalProperties": false,
"required": ["name", "description"],
"properties": {
"name": {
"type": "string",
"contentType": "markdown"
},
"description": {
"type": "string",
"contentType": "markdown",
"tags": ["localizable"]
}
},
"type": "object"
},
"minItems": 0, // Cmdlet can have no inputs, but the "Inputs" section must exist.
"type": "array"
},
"links": {
"items": {
"additionalProperties": false,
"required": ["href", "text"],
"properties": {
"href": {
"type": "string",
"contentType": "href"
},
"text": {
"type": "string",
"tags": ["localizable"]
}
},
"type": "object"
},
"minItems": 1,
"type": "array"
},
"metadata": { // this YAML front matter
"required": ["title", "external help file", "locale", "module name", "ms.date", "oneline version", "schema"], // 'external help file' must exists but can be blank.
"properties": {
"description": { // what is this for? For SEO?
"type": "string",
"tags": ["localizable"]
},
"title": {
"type": "string",
"tags": ["localizable"]
},
"external help file": {
"items": {
"type": "string"
},
"minItems": 0
},
"locale": {
"type": "string"
},
"module name":{
"type": "string"
},
"ms.date": {
"type": "string"
},
"online version": {
"type": "string",
"contentType": "href"
},
"schema": {
"type": "string"
}
},
"type": "object"
},
"module": {
"type": "string",
"contentType": "xref"
},
"name": { // Is this Title? No change.
"type": "string"
},
"notes": {
"type": "string",
"contentType": "markdown",
"tags": ["localizable"]
},
"outputs": {
"items": {
"additionalProperties": false,
"required": ["name", "description"],
"properties": {
"name": {
"type": "string",
"contentType": "markdown"
},
"description": {
"type": "string",
"contentType": "markdown",
"tags": ["localizable"]
}
},
"type": "object"
},
"minItems": 1,
"type": "array"
},
"parameters": {
"items": {
"additionalProperties": false,
"required": ["name", "description", "type", "position"],
"properties": {
"name": {
"type": "string"
},
"summary": {
"type": "string",
"contentType": "markdown",
"tags": ["localizable"]
},
"description": {
"type": "string",
"contentType": "markdown",
"tags": ["localizable"]
},
"isRequired": {
"type": "boolean"
},
"applicable": {
"items": {
"type": "string"
},
"minItems": 1,
"type": "array"
},
"type": {
"type": "string"
},
"aliases": {
"type": "string"
},
"parameterValueGroup": { // is this ParameterSetName?
"type": "string"
},
"position": { // this could be different per parameter set
"type": "string"
},
"defaultValue": {
"type": "string"
},
"pipelineInput": { // this could be different per parameter set
"type": "string"
},
"acceptWildcardCharacters": {
"type": "boolean"
},
"valueFrom": { // what is this?
"type": "string"
},
"acceptedValues": {
"value": {
"type": "string"
},
"type": "array",
"minItems": 1
},
"confirmImpact": {
"type": "string"
}
},
"type": "object"
},
"minItems": 1,
"type": "array"
},
"commonParameters": {
"parameters": {
"type": "string",
"contentType": "markdown"
},
"type":"object",
"minItems": 1,
"maxItems": 1
},
"summary": { // is this Synopsis? No change.
"type": "string",
"contentType": "markdown",
"tags": ["localizable"]
},
"syntaxes": {
"items": [
{
"items": {
"required": ["Parameter Set name", "Parameters"],
"properties": {
"Parameter Set name": {
"type": "string"
},
"Parameters": {
"type": "string"
}
}
}
}
],
"minItems": 1,
"type": "array"
}
},
"uid": {
"type": "string",
"contentType": "uid"
}
},
"metadata": "/metadata",
"xrefProperties": ["name", "summary"]
}
Loading