Commit Graph

18 Commits

Author SHA1 Message Date
John Vandenberg d3e89232a3
Move test generated clients into a buildable crate (#638) 2024-01-10 16:22:57 -08:00
John Vandenberg 2fd9260fc4
Use crate name when emitting derive for tests (#641) 2023-12-13 00:48:59 -08:00
Ian Nickles 6dc2a0ff2d
Generate unique internal var names and add tests for name collisions. (#601)
* Generate unique identifiers for internal variable names instead of using a
static prefix.

* Add tests for previous name collision issues.

* only prefix when needed.

Co-authored-by: Adam Leventhal <ahl@oxide.computer>

* add missing test invocation.

* update test fixtures per aaa40855485ca3c2ccf338c07d595ffc907975a1.

---------

Co-authored-by: Adam Leventhal <ahl@oxide.computer>
2023-10-16 11:44:24 -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 10dc4cafc6
CLI generation prototype (#349) 2023-03-28 14:54:05 -07:00
Adam Leventhal 88ff3cf1e0
update typify and nexus.json (#323) 2023-01-31 21:28:12 -08:00
John Vandenberg 1ef131a244
Add yaml support (#227) 2023-01-14 08:58:57 -08:00
Artem Medvedev e34756583a
feat: support header parameters (#210) 2023-01-04 11:14:37 -08:00
Adam Leventhal 57031d77d3
Allow conversion overrides by specifying a schema (#280) 2022-12-27 11:55:57 -08: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 e4221a1350
Typify update for builder structs (#171) 2022-08-18 11:58:55 -07:00
Adam Leventhal 6796e0c1ca
extra derives are accidentally ignored (#105) 2022-07-02 22:28:06 -07:00
Adam Leventhal 9b28ac87c6
add an optional builder pattern as well as extension traits for tags when using the builder interface (#86) 2022-07-02 19:09:38 -07:00
Adam Leventhal e58ebd18fa
introduce an intermediate form (#18)
introduce an intermediate form; this is going to be used to generate a few different things:
- an interator interface for paginated APIs; the IR will let us re-use
  the typify types
- a CLI generator that will generate calls into the generated client
- an automated test harness that will validate the generated client
  against a mock server
2021-12-09 18:15:24 -08:00
Adam Leventhal 97857c347c
convert from executable -> executable + library with macro and builder options (#9) 2021-10-17 10:40:22 -07:00