Skip to content

Commit

Permalink
Fix Documentation (#71)
Browse files Browse the repository at this point in the history
In lieu of having schemas in place, we need to update the docs to hint
that providers and stuff need to have an ID now.
  • Loading branch information
spjmurray authored Jun 6, 2024
1 parent 74e4623 commit fb6a7bb
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 28 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ clients:
redirectURI: ${UI_OIDC_CALLBACK}
loginURI: ${UI_LOGIN_CALLBACK} # (optional)
providers:
- type: google # (must be either google or microsoft)
# Use "uuidgen -r" to select a random ID, this MUST start with a character a-f.
- id: bec71681-8749-4816-a708-7f529d20db2e
type: google # (must be either google or microsoft)
name: google-identity
displayName: Google Identity
issuer: https://accounts.google.com
Expand Down
53 changes: 26 additions & 27 deletions specifications/resource-metdata.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ This proposal aims to provide a formal specification that allows the best user e
## Changelog

- v1.0.0 2024-05-29 (@spjmurray): Initial RFC
- v1.0.1 2024-06-06 (@spjmurray): Update to mirror reality

## Considerations

Expand Down Expand Up @@ -93,29 +94,35 @@ components:
- provisioned
- deprovisioning
- error
resourceReadMetadata:
resourceMetadata:
type: object
required:
- id
- name
- description
- creationTime
- status
properties:
id:
type: string
name:
type: string
description:
type: string
creationTime:
type: string
format: date-time
deletionTime:
type: string
format: date-time
provisioningStatus:
$ref: '#/components/schemas/resourceProvisioningStatus'
resourceReadMetadata:
allOf:
- $ref: '#/components/schemas/resourceMetadata'
- type: object
required:
- id
- creationTime
- provisioningStatus
properties:
id:
type: string
creationTime:
type: string
format: date-time
deletionTime:
type: string
format: date-time
provisioningStatus:
$ref: '#/components/schemas/resourceProvisioningStatus'
```
Scoped metadata would look like the following.
Expand All @@ -129,18 +136,18 @@ components:
- $ref: '#/components/schemas/resourceReadMetadata'
- type: object
required:
- organizationID
- organizationId
properties:
organizationID:
organizationId:
type: string
projectScopedResourceReadMetadata:
allOf:
- $ref: '#/components/schemas/organizationScopedResourceReadMetadata'
- type: object
required:
- projectID
- projectId
properties:
projectID:
projectId:
type: string
```
Expand Down Expand Up @@ -169,15 +176,7 @@ Generic metadata should look like the following:
components:
schemas:
resourceWriteMetadata:
type: object
required:
- name
- description
properties:
name:
type: string
description:
type: string
$ref: '#/components/schemas/resourceMetadata'
```
This quite clearly makes a distinction between mutable fields that can be written by a client, and read-only fields that are controlled by the server.
Expand Down

0 comments on commit fb6a7bb

Please sign in to comment.