Commit Graph

69 Commits

Author SHA1 Message Date
Adam Leventhal eb0d9d207a
Restructure argument processing (#523)
Restructure argument processing to close up some corner cases where we didn't properly identify when the json body was required and to make it more extensible to other types of parameters such as those derived from enum variants.
2023-07-14 17:37:54 -07:00
Adam Leventhal 66c890807f
CLI: improve required settings for paginated operations (#469) 2023-05-15 08:59:07 -07:00
Adam Leventhal e7c4c16d9f
add special handling for optional query parameters (#468) 2023-05-12 15:04:00 -07:00
Adam Leventhal b94123e5ac
httpmock patterns are too general (#467) 2023-05-12 13:19:09 -07:00
Adam Leventhal db1826841e
add a json-body option to specify the full body (#458) 2023-05-07 20:43:45 -07:00
Benjamin Leonard 1121d5948c
Support for `long_about` in `generated_cli` (#456) 2023-05-04 08:36:17 -07:00
Adam Leventhal d0d1137a3a
generated streaming interfaces should honor the limit input (#455) 2023-05-03 20:53:28 -07:00
Adam Leventhal 29ac543eb5
CLI: simple handling of paginated operations (#454) 2023-05-03 11:42:38 -07:00
Adam Leventhal 6936ecc51a
update typify (#452) 2023-05-02 13:55:50 -07:00
Adam Leventhal 6a515c304f
CLI: generate a fixed list of valid values for enum types (#442) 2023-04-26 15:15:07 -07:00
Dillen Meijboom d329bc0912
Add support for wasm (#278) 2023-04-25 21:50:04 -07:00
John Vandenberg b717086ef3
Remove rustfmt from progenitor-impl (#368) 2023-04-25 09:11:52 -07:00
Adam Leventhal 7da8db8544
generate `httpmock`-based testing code (#437) 2023-04-24 19:03:33 -07:00
Adam Leventhal a9e76608ca
add accept header (#436) 2023-04-24 17:42:22 -07:00
Adam H. Leventhal a4abdf60c5 cli: not all arguments are used to construct the body parameter 2023-04-04 11:52:25 -07:00
Adam Leventhal e04bb171f6
cli: handle optional body parameters (#401) 2023-03-30 12:27:25 -07:00
Adam Leventhal 4eb8cd6c21
make the OpenAPI info.version field accessible through the generated client (#400) 2023-03-29 23:02:17 -07:00
Adam Leventhal 94db6ff74f
complete CLI overrides to allow consumers to modify commands and execution (#399) 2023-03-29 16:50:41 -07:00
Adam Leventhal 10dc4cafc6
CLI generation prototype (#349) 2023-03-28 14:54:05 -07:00
Adam Leventhal 297a0c2f0a
builds can fail if TryFrom is not imported... sufficiently (#393) 2023-03-27 10:45:25 -07:00
Adam Leventhal d0b9842ce3
use body builder types in operation builders (#385) 2023-03-23 18:11:44 -07:00
Adam Leventhal 3f47ff856c
update dropshot and typify (#383) 2023-03-22 22:56:25 -07:00
dependabot[bot] c922600923
Bump typify from `d1cae0f` to `b35e5c0` (#366)
* Bump typify from `d1cae0f` to `b35e5c0`

Bumps [typify](https://github.com/oxidecomputer/typify) from `d1cae0f` to `b35e5c0`.
- [Release notes](https://github.com/oxidecomputer/typify/releases)
- [Commits](d1cae0f7d5...b35e5c06e7)

---
updated-dependencies:
- dependency-name: typify
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* update fixture data

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam H. Leventhal <ahl@oxide.computer>
2023-03-17 15:39:46 -07:00
Adam Leventhal 1b942d1146
correct builder error message for Option types (#327) 2023-02-05 20:31:40 -08:00
Adam Leventhal c26af3bd95
update typify; update tests (#326) 2023-02-04 17:22:55 -08:00
Adam Leventhal 88ff3cf1e0
update typify and nexus.json (#323) 2023-01-31 21:28:12 -08:00
dependabot[bot] 713138673f
Bump typify from `c18d045` to `cd1f95b` (#322)
* Bump typify from `c18d045` to `cd1f95b`

Bumps [typify](https://github.com/oxidecomputer/typify) from `c18d045` to `cd1f95b`.
- [Release notes](https://github.com/oxidecomputer/typify/releases)
- [Commits](c18d0452db...cd1f95b66b)

---
updated-dependencies:
- dependency-name: typify
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* update output

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam H. Leventhal <ahl@oxide.computer>
2023-01-30 12:17:51 -08:00
Adam Leventhal 32f2089f41
update typify + fixture data (#318) 2023-01-25 09:19:15 -08:00
John Vandenberg 1ef131a244
Add yaml support (#227) 2023-01-14 08:58:57 -08:00
Adam Leventhal 96af7b5a09
documentation examples sometimes are not formatted properly (#303) 2023-01-13 10:59:21 -08:00
Adam Leventhal a5fea0b061
fix a warning with base64 (#300) 2023-01-11 14:19:55 -08:00
bnaecker ba189e6323
Add docstrings to the generated Client (#295)
- Add docstring to the `Client`, based on the OpenAPI title and
  description, if provided.
- Add docstrings to the constructors and getters shared by all generated
  clients.
- Update expectorate tests.
- Small typo-fix in README.
2023-01-07 18:05:33 -08:00
Artem Medvedev e34756583a
feat: support header parameters (#210) 2023-01-04 11:14:37 -08:00
dependabot[bot] de6895a040
Bump typify from `da0505b` to `5106273` (#291)
* Bump typify from `da0505b` to `5106273`

Bumps [typify](https://github.com/oxidecomputer/typify) from `da0505b` to `5106273`.
- [Release notes](https://github.com/oxidecomputer/typify/releases)
- [Commits](da0505b0b4...5106273f3d)

---
updated-dependencies:
- dependency-name: typify
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* update output

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam H. Leventhal <ahl@oxide.computer>
2023-01-02 19:42:54 -08:00
Adam Leventhal 57031d77d3
Allow conversion overrides by specifying a schema (#280) 2022-12-27 11:55:57 -08:00
dependabot[bot] 83ed0e14bb
Bump typify from `c840ea7` to `55d9fa1` (#264)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam H. Leventhal <ahl@oxide.computer>
2022-12-02 11:09:46 -05:00
Augustus Mayo 12d4adbc6c
Path level parameters (#262) 2022-12-01 22:50:50 -08:00
Adam Leventhal 68290b08e0
allow for type adjustments: renames, and additional derives (#234) 2022-11-14 10:51:05 -08:00
liffy 4e2dcc5365
Generate a Client method for Dropshot websocket channels (#183)
Generated methods return `ResponseValue<reqwest::Upgrade`, which may be
passed to a websocket protocol implementation such as
`tokio_tungstenite::WebSocketStream::from_raw_stream(rv.into_inner(), ...)`
for the purpose of implementing against the raw websocket connection, but
may later be extended as a generic to allow higher-level channel message
definitions.

Per the changelog, consumers will need to depend on reqwest 0.11.12 or
newer for HTTP Upgrade support, as well as base64 and rand if any
endpoints are websocket channels:
```
[dependencies]
reqwest = { version = "0.11.12" features = ["json", "stream"] }
base64 = "0.13"
rand = "0.8"
```

Co-authored-by: lif <>
2022-09-28 13:40:07 -07:00
Adam Leventhal 7e5dc6586c
gussy up docs for release (#193)
make TryInto use fully specified as std::convert::TryInto
2022-09-10 17:15:14 -07:00
Adam H. Leventhal ad8be1fdd5 update to typify 0.0.10 2022-09-10 09:41:07 -07:00
Adam Leventhal fa4e09f00a
sync w/ typify and add a test (#178) 2022-08-27 09:31:35 -07:00
Adam Leventhal e79ac19ae7
Add prelude for Client and extension traits (when they exist) (#176) 2022-08-27 08:23:02 -07:00
Adam Leventhal e4221a1350
Typify update for builder structs (#171) 2022-08-18 11:58:55 -07:00
Karen Cárcamo ba00230176
Derive Debug for types (#145)
* Derive Debug for client and types

* run tests

* update changelog

* refactor
2022-08-03 13:18:43 +12:00
Adam Leventhal ea5a6a5a79
update nexus and typify (#142) 2022-07-26 21:23:01 -07:00
Adam Leventhal bfd194f39c
Change builder methods for setting a parameter with type T to accept a TryInto<T> (#133)
This makes constrained types a bit more
ergonomic and will allow us to accept fallible builders more easily
2022-07-18 11:55:21 -07:00
Adam Leventhal 9f6f940705
update nexus openapi (#126) 2022-07-14 20:59:36 -07:00
dependabot[bot] 75519247fa
Bump typify from `7b5f72b` to `f58c5e2` (#117)
* Bump typify from `7b5f72b` to `f58c5e2`

Bumps [typify](https://github.com/oxidecomputer/typify) from `7b5f72b` to `f58c5e2`.
- [Release notes](https://github.com/oxidecomputer/typify/releases)
- [Commits](7b5f72b1e4...f58c5e23b1)

---
updated-dependencies:
- dependency-name: typify
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* fixups and output update

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam H. Leventhal <ahl@oxide.computer>
2022-07-12 10:57:06 -07:00
Joshua M. Clulow 6e90509eef
improved template parsing (#111) 2022-07-08 16:54:53 -07:00