Skip to content

docs: update swaggo/swag v1.8.9 #5590

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

Merged
merged 9 commits into from
Jan 10, 2023
Merged

docs: update swaggo/swag v1.8.9 #5590

merged 9 commits into from
Jan 10, 2023

Conversation

mtojek
Copy link
Member

@mtojek mtojek commented Jan 5, 2023

Related: #5538 (comment)

@mtojek mtojek self-assigned this Jan 5, 2023
Copy link
Member Author

@mtojek mtojek left a comment

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.

| 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
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
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
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.

Copy link
Member

@mafredri mafredri left a comment

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.

| 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
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?

@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
29 tasks
@mtojek mtojek requested a review from mafredri January 10, 2023 14:40
Copy link
Member

@mafredri mafredri left a comment

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