Skip to content

Commit 1391ef8

Browse files
authored
Improve API Documentation (#142)
As we now present this as a live service, we want the documentation to be as solid as possible to self support end users. This also goes through the torturous process of aspell given prose is interleaved with code.
1 parent b922cce commit 1391ef8

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

charts/core/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ description: A Helm chart for deploying Unikorn Core
44

55
type: application
66

7-
version: v1.1.0-rc6
8-
appVersion: v1.1.0-rc6
7+
version: v1.1.0-rc7
8+
appVersion: v1.1.0-rc7
99

1010
icon: https://assets.unikorn-cloud.org/images/logos/dark-on-light/icon.svg
1111

pkg/openapi/common.spec.yaml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ components:
1313
- error_description
1414
properties:
1515
error:
16-
description: A terse error string expanding on the HTTP error code. Errors are based on the OAuth2 specification, but are expanded with proprietary status codes for APIs other than those specified by OAuth2.
16+
description: A terse error string expanding on the HTTP error code. Errors are based on the OAuth 2.02 specification, but are expanded with proprietary status codes for APIs other than those specified by OAuth 2.02.
1717
type: string
1818
enum:
19-
# Defined by OAuth2
19+
# Defined by OAuth 2.02
2020
- invalid_request
2121
- unauthorized_client
2222
- access_denied
@@ -38,16 +38,21 @@ components:
3838
type: string
3939
kubernetesLabelValue:
4040
description: |-
41-
A valid Kubenetes label value, typically used for resource names that can be
41+
A valid Kubernetes label value, typically used for resource names that can be
4242
indexed in the database.
4343
type: string
4444
pattern: '^[0-9A-Za-z](?:[0-9A-Za-z-_.]{0,61}[0-9A-Za-z])?$'
4545
semver:
46-
description: A semantic version.
46+
description: |-
47+
A semantic version in the form v1.2.3.
48+
Pre-releases and variants are not currently supported.
4749
type: string
4850
pattern: '^v\d+\.\d+\.\d+$'
4951
tag:
50-
description: An arbitrary tag name and value.
52+
description: |-
53+
A tag mapping arbitrary names to values. These have no special meaning
54+
for any component are are intended for use by end users to add additional
55+
context to a resource, for example to categorize it.
5156
type: object
5257
required:
5358
- name
@@ -65,7 +70,7 @@ components:
6570
items:
6671
$ref: '#/components/schemas/tag'
6772
resourceMetadata:
68-
description: Resource metadata valid for all API resource reads and writes.
73+
description: Metadata required for all API resource reads and writes.
6974
required:
7075
- name
7176
properties:
@@ -80,7 +85,7 @@ components:
8085
staticResourceMetadata:
8186
description: |
8287
This metadata is for resources that just exist, and don't require
83-
any provisioning and health status, but benefit from a standarized
88+
any provisioning and health status, but benefit from a standardized
8489
metadata format.
8590
type: object
8691
allOf:
@@ -124,7 +129,7 @@ components:
124129
- healthy
125130
- degraded
126131
resourceReadMetadata:
127-
description: Resource metadata valid for all reads.
132+
description: Metadata required by all resource reads.
128133
allOf:
129134
- $ref: '#/components/schemas/staticResourceMetadata'
130135
- type: object
@@ -141,6 +146,7 @@ components:
141146
healthStatus:
142147
$ref: '#/components/schemas/resourceHealthStatus'
143148
organizationScopedResourceReadMetadata:
149+
description: Metadata required by organization scoped resource reads.
144150
allOf:
145151
- $ref: '#/components/schemas/resourceReadMetadata'
146152
- type: object
@@ -151,6 +157,7 @@ components:
151157
description: The organization identifier the resource belongs to.
152158
type: string
153159
projectScopedResourceReadMetadata:
160+
description: Metadata required by project scoped resource reads.
154161
allOf:
155162
- $ref: '#/components/schemas/organizationScopedResourceReadMetadata'
156163
- type: object
@@ -166,7 +173,8 @@ components:
166173
acceptedResponse:
167174
description: |-
168175
The request has been accepted and will be fulfilled asynchronously.
169-
You may poll the resource and monitor its status for completion.
176+
You may poll the resource and monitor its provisioning and health status
177+
to await completion of the operation.
170178
badRequestResponse:
171179
description: |-
172180
Request body failed schema validation, or the request does not contain
@@ -190,7 +198,7 @@ components:
190198
error_description: authentication failed
191199
forbiddenResponse:
192200
description: |-
193-
Request was denied by authorisation, this may be caused by the authorisation
201+
Request was denied by authorization, this may be caused by the authorization
194202
token not having the required scope for an API, or the user doesn't have the
195203
necessary privileges on the provider platform.
196204
content:
@@ -222,8 +230,8 @@ components:
222230
error_description: a resource with the same name already exists
223231
internalServerErrorResponse:
224232
description: |-
225-
An unexpected error occurred, this may be an unexpected transient error and
226-
may succeed on a retry. If this isn't the case, please report it as an issue.
233+
An unexpected or unhandled error occurred. This may be a transient error and
234+
may succeed on a retry. If this isn't the case, please report it as an issue.
227235
content:
228236
application/json:
229237
schema:

0 commit comments

Comments
 (0)