Skip to content
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

docs(template): Document template too large #321

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
29 changes: 29 additions & 0 deletions contracts/cloud.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions contracts/cloud.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions contracts/common.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions contracts/oss.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions contracts/oss.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions contracts/ref/cloud.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions contracts/ref/oss.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# When APIs Drift

Within this (`src`) directory, you will find all API resource definitions. OSS/Cloud specific resources are defined in the `src/oss` and `src/cloud` directories respectively. When a shared type drifts, it will need to be removed from `common` and placed into the resource type's directory within the platform (cloud/oss) specific directory. Caution should be exercized so as to avoid stale references in complex resource types.
Within this (`src`) directory, you will find all API resource definitions. OSS/Cloud specific resources are defined in the `src/oss` and `src/cloud` directories respectively. When a shared type drifts, it will need to be removed from `common` and placed into the resource type's directory within the platform (cloud/oss) specific directory. Caution should be exercised to avoid stale references in complex resource types.

For example if it there was some cloud only changes to the `AddResourceMemberRequestBody` type, one would:
If there was some cloud only changes to the `AddResourceMemberRequestBody` type, one would:
```sh
# copy the type to the platform where the type has changed
copy src/common/schemas/AddResourceMemberRequestBody.yml src/cloud/schemas/AddResourceMemberRequestBody.yml
Expand Down
6 changes: 6 additions & 0 deletions src/common/paths/templates_apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ post:
application/json:
schema:
$ref: "../schemas/TemplateSummary.yml"
"413":
description: Template too large
content:
application/json:
schema:
$ref: "../schemas/TemplateTooLargeError.yml"
"422":
description: Template failed validation
content:
Expand Down
9 changes: 9 additions & 0 deletions src/common/schemas/TemplateTooLargeError.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
allOf:
- $ref: "./TemplateSummary.yml"
- type: object
required: [message, code]
properties:
message:
type: string
code:
type: string