Skip to content

docs: update swaggo/swag v1.8.9 - #5590

Merged
mtojek merged 9 commits into
coder:mainfrom
mtojek:try-bump-swaggo
Jan 10, 2023
Merged

mtojek merged 9 commits into
coder:mainfrom
mtojek:try-bump-swaggo

Conversation

@mtojek

@mtojek mtojek commented Jan 5, 2023

Copy link
Copy Markdown
Member

Related: #5538 (comment)

@mtojek mtojek self-assigned this Jan 5, 2023

@mtojek mtojek left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mafredri Here is the doc output if we decided to use the latest revision of swag. Please let me know your thoughts.

Comment thread docs/api/agents.md Resolved
Comment thread docs/api/general.md Resolved
Comment thread docs/api/general.md Resolved
Comment thread docs/api/schemas.md Outdated
| Name | Type | Required | Restrictions | Description |
| -------- | ------------------------------------------------------------ | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `action` | string | false | | |
| `object` | [codersdk.AuthorizationObject](#codersdkauthorizationobject) | false | | Object can represent a "set" of objects, such as: - All workspaces in an organization - All workspaces owned by me - All workspaces across the entire product When defining an object, use the most specific language when possible to produce the smallest set. Meaning to set as many fields on 'Object' as you can. Example, if you want to check if you can update all workspaces owned by 'me', try to also add an 'OrganizationID' to the settings. Omitting the 'OrganizationID' could produce the incorrect value, as workspaces have both `user` and `organization` owners. |

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A different source of description?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's the same source, but parsing might have changed or been broken? Perhaps swagger expects certain type of formatting for lists?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In postprocessing, we're replacing , so maybe it interferes here. As a quick fix, I replaced it with a single-line sentence.

Comment thread docs/api/schemas.md Resolved
Comment thread docs/api/schemas.md Resolved

@mafredri mafredri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice changes all-in-all. Added some comments but I think we'd get pretty far with a simple replace on time.Duration.

Comment thread docs/api/agents.md Resolved
Comment thread docs/api/parameters.md Resolved
Comment thread docs/api/schemas.md Resolved
Comment thread docs/api/schemas.md Outdated
| Name | Type | Required | Restrictions | Description |
| -------- | ------------------------------------------------------------ | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `action` | string | false | | |
| `object` | [codersdk.AuthorizationObject](#codersdkauthorizationobject) | false | | Object can represent a "set" of objects, such as: - All workspaces in an organization - All workspaces owned by me - All workspaces across the entire product When defining an object, use the most specific language when possible to produce the smallest set. Meaning to set as many fields on 'Object' as you can. Example, if you want to check if you can update all workspaces owned by 'me', try to also add an 'OrganizationID' to the settings. Omitting the 'OrganizationID' could produce the incorrect value, as workspaces have both `user` and `organization` owners. |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's the same source, but parsing might have changed or been broken? Perhaps swagger expects certain type of formatting for lists?

Comment thread docs/api/schemas.md Resolved
Comment thread docs/api/schemas.md Resolved
Comment thread docs/api/templates.md Resolved
@mtojek
mtojek marked this pull request as ready for review January 10, 2023 14:37
@mtojek
mtojek requested a review from bpmct January 10, 2023 14:37
@mtojek mtojek mentioned this pull request Jan 10, 2023
28 of 29 tasks
@mtojek
mtojek requested a review from mafredri January 10, 2023 14:40

@mafredri mafredri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This turned out great, nice improvements!

@mtojek
mtojek merged commit a23a471 into coder:main Jan 10, 2023
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants