Commit Graph

3 Commits

Author SHA1 Message Date
Mathias Fredriksson 856f0ab6f5
chore: Improve project-wide prettier formatting and ignored files (#5505)
* chore: Improve project-wide prettier formatting and ignored files

* chore: `Run make fmt/prettier`

* Fix gitignore for `.vscode` folder so that ! works

* Add comment in `.prettierrc.yaml` to explain `.editorconfig`

* Remove scripts/apidocgen/markdown-template/README.md

* Use `yq` for processing prettierrc, update lib.sh dependency check

* Add `yq` to Dockerfile and Nix
2023-01-03 15:11:13 +02:00
Asher 26b04cc96f
chore: switch to generated types (#1394)
* Make column renderer use the same type as its key

That way the renderer only takes `string` for example when rendering the
name field instead of `string | number` when the interface has some
fields that are strings and some fields are numbers.

This will be necessary when switching to generated types since some of
the fields are numbers (like the owner count on a template).

* Switch fully to generated types

In some places the organization ID is part of the URL but not part of
the request so I separated out the ID into a separate argument in the
relevant API functions.

Otherwise this was a straightforward replacement where I mostly only
needed to change some of the interface names (User instead of
UserResponse for example) and add a few missing but required properties.

I kind of winged the template form; I am not sure what the difference
between a template and template version is or why the latter comes
before the former so the form just returns all the data required to
create both.

* Delete handwritten types

Except for UserAgent which seems to be purely frontend and
ReconnectingPTYRequest which is not in codersdk so I am just leaving it
for now.

* Remove implemented omitempty as a future idea

This was implemented in 2d3dc436a8.

* Add missing optionalities to generated request interfaces
2022-05-12 10:01:28 -05:00
Steven Masley e330dc1321
feat: Switch packages for typescript generation code (#1196)
* feat: Switch packages for typescript generation code

Supports a larger set of types
  - [x] Basics (string/int/etc) 
  - [x] Maps
  - [x] Slices
  - [x] Enums
  - [x] Pointers
2022-04-28 16:59:14 +00:00