-
Notifications
You must be signed in to change notification settings - Fork 258
feat: add OpenAPI doc generation script and improve envd spec #1952
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
Open
beran-t
wants to merge
11
commits into
main
Choose a base branch
from
generate-openapi-script-v2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
96ae011
feat: add OpenAPI doc generation script and improve envd spec
beran-t 47fe918
chore: auto-commit generated changes
github-actions[bot] d620155
fix: address PR review comments on generate_openapi script
beran-t 2a080e5
fix: update Go code to match generated types from new operationIds
beran-t a9f817d
fix: remove unnecessary type conversions and fix remaining renames
beran-t f0533d1
fix: revert Go code changes, move operationIds to post-processing
beran-t 01c85b0
chore: auto-commit generated changes
github-actions[bot] 267b329
fix: protect envd paths from being overwritten during spec merge
beran-t 1d015c6
fix: change /health response from 200 to 204 in platform API spec
beran-t 30686a9
chore: auto-commit generated changes
github-actions[bot] 183dad6
fix: correct spec to match live API responses
beran-t File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -97,12 +97,14 @@ paths: | |||||
| responses: | ||||||
| "200": | ||||||
| $ref: "#/components/responses/DownloadSuccess" | ||||||
| "401": | ||||||
| $ref: "#/components/responses/InvalidUser" | ||||||
| "400": | ||||||
| $ref: "#/components/responses/InvalidPath" | ||||||
| "401": | ||||||
| $ref: "#/components/responses/InvalidUser" | ||||||
| "404": | ||||||
| $ref: "#/components/responses/FileNotFound" | ||||||
| "406": | ||||||
| $ref: "#/components/responses/NotAcceptable" | ||||||
| "500": | ||||||
| $ref: "#/components/responses/InternalServerError" | ||||||
| post: | ||||||
|
|
@@ -142,28 +144,28 @@ components: | |||||
| name: path | ||||||
| in: query | ||||||
| required: false | ||||||
| description: Path to the file, URL encoded. Can be relative to user's home directory. | ||||||
| description: Path to the file, URL encoded. Can be relative to the user's home directory (e.g. "file.txt" resolves to ~/file.txt). | ||||||
| schema: | ||||||
| type: string | ||||||
| User: | ||||||
| name: username | ||||||
| in: query | ||||||
| required: false | ||||||
| description: User used for setting the owner, or resolving relative paths. | ||||||
| description: User for setting file ownership and resolving relative paths. Defaults to the sandbox's default user. | ||||||
| schema: | ||||||
| type: string | ||||||
| Signature: | ||||||
| name: signature | ||||||
| in: query | ||||||
| required: false | ||||||
| description: Signature used for file access permission verification. | ||||||
| description: HMAC signature for access verification. Required when no X-Access-Token header is provided. Format is "v1_<sha256hash>". | ||||||
| schema: | ||||||
| type: string | ||||||
| SignatureExpiration: | ||||||
| name: signature_expiration | ||||||
| in: query | ||||||
| required: false | ||||||
| description: Signature expiration used for defining the expiration time of the signature. | ||||||
| description: Unix timestamp (seconds) after which the signature expires. Only used with the signature parameter. | ||||||
| schema: | ||||||
| type: integer | ||||||
|
|
||||||
|
|
@@ -188,45 +190,73 @@ components: | |||||
| type: array | ||||||
| items: | ||||||
| $ref: "#/components/schemas/EntryInfo" | ||||||
| example: | ||||||
| - path: "/home/user/hello.txt" | ||||||
| name: "hello.txt" | ||||||
| type: "file" | ||||||
|
|
||||||
| DownloadSuccess: | ||||||
| description: Entire file downloaded successfully. | ||||||
| description: File content. Content-Type is detected from the file extension (defaults to application/octet-stream). Content-Disposition header contains the filename. | ||||||
| content: | ||||||
| application/octet-stream: | ||||||
| schema: | ||||||
| type: string | ||||||
| format: binary | ||||||
| description: The file content | ||||||
| description: The raw file content | ||||||
| NotAcceptable: | ||||||
| description: Requested encoding is not supported | ||||||
| content: | ||||||
| application/json: | ||||||
| schema: | ||||||
| $ref: "#/components/schemas/Error" | ||||||
| example: | ||||||
| message: "no acceptable encoding found, supported: [identity, gzip]" | ||||||
| code: 406 | ||||||
| InvalidPath: | ||||||
| description: Invalid path | ||||||
| content: | ||||||
| application/json: | ||||||
| schema: | ||||||
| $ref: "#/components/schemas/Error" | ||||||
| example: | ||||||
| message: "path '/home/user/docs' is a directory" | ||||||
| code: 400 | ||||||
| InternalServerError: | ||||||
| description: Internal server error | ||||||
| content: | ||||||
| application/json: | ||||||
| schema: | ||||||
| $ref: "#/components/schemas/Error" | ||||||
| example: | ||||||
| message: "error opening file '/home/user/file.txt': permission denied" | ||||||
| code: 500 | ||||||
| FileNotFound: | ||||||
| description: File not found | ||||||
| content: | ||||||
| application/json: | ||||||
| schema: | ||||||
| $ref: "#/components/schemas/Error" | ||||||
| example: | ||||||
| message: "path '/home/user/missing.txt' does not exist" | ||||||
| code: 404 | ||||||
| InvalidUser: | ||||||
| description: Invalid user | ||||||
| content: | ||||||
| application/json: | ||||||
| schema: | ||||||
| $ref: "#/components/schemas/Error" | ||||||
| example: | ||||||
| message: "error looking up user 'nonexistent': user: unknown user nonexistent" | ||||||
| code: 401 | ||||||
| NotEnoughDiskSpace: | ||||||
| description: Not enough disk space | ||||||
| content: | ||||||
| application/json: | ||||||
| schema: | ||||||
| $ref: "#/components/schemas/Error" | ||||||
| example: | ||||||
| message: "not enough disk space available" | ||||||
| code: 507 | ||||||
|
|
||||||
| schemas: | ||||||
| Error: | ||||||
|
|
@@ -283,6 +313,12 @@ components: | |||||
| mem_used: | ||||||
| type: integer | ||||||
| description: Used virtual memory in bytes | ||||||
| mem_total_mib: | ||||||
| type: integer | ||||||
| description: Total virtual memory in MiB | ||||||
| mem_used_mib: | ||||||
| type: integer | ||||||
| description: Used virtual memory in MiB | ||||||
| disk_used: | ||||||
| type: integer | ||||||
| description: Used disk space in bytes | ||||||
|
|
@@ -291,13 +327,15 @@ components: | |||||
| description: Total disk space in bytes | ||||||
| VolumeMount: | ||||||
| type: object | ||||||
| description: Volume | ||||||
| description: NFS volume mount configuration | ||||||
| additionalProperties: false | ||||||
| properties: | ||||||
| nfs_target: | ||||||
| type: string | ||||||
| description: NFS server target address | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| path: | ||||||
| type: string | ||||||
| description: Mount path inside the sandbox | ||||||
| required: | ||||||
| - nfs_target | ||||||
| - path | ||||||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.