Adam Leventhal
579260a943
correct handling of parameters ( #32 )
...
- improve parameter handling for names that are invalid rust identifiers
- fix broken logic for non-optional query parameters
2022-03-04 10:58:16 -08:00
Adam Leventhal
39b1d9107d
add helper functions to Error and ResponseValue ( #28 )
2022-02-23 21:07:30 -08:00
Adam H. Leventhal
24aa57a243
typo
2022-02-08 09:02:00 -08:00
Adam Leventhal
25192b5dc1
Add a wrapper types for success and error responses ( #26 )
2022-02-08 08:59:38 -08:00
Adam H. Leventhal
f1f9e2e938
improve santization
2022-01-16 09:09:30 -08:00
Adam Leventhal
aff25f2292
Allow consumers to specify additional derive macros for generated types ( #21 )
2022-01-14 18:01:59 -08:00
Adam Leventhal
e47fc93748
generate iterators over dropshot paginated interfaces ( #19 )
...
* Adds support for interating with Streams over interfaces that are tagged
with the x-dropshot-pagination extension. This requires clients to use
the futures crate.
Adds tests that compile generated clients.
Updates nexus.json to reflect a more recent omicron API.
Changes all generated methods to have a lifetime ('a) bound on all
references. This isn't necessary for most methods, but greatly
simplifies generation of the associated paginated interface.
2022-01-05 12:02:46 -08: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
Joshua M. Clulow
66b41ba301
buildomat: add basic build/test job mimicking the Actions workflow
2021-11-19 12:14:31 -08:00
Joshua M. Clulow
b2a833e351
enable buildomat check suites on push and pull request
2021-11-19 12:12:19 -08:00
David Crespo
f53d122406
bump openapiv3 to 1.0.0-beta.5 ( #17 )
2021-11-16 22:06:49 -08:00
Adam Leventhal
dd9d1e8846
use include_str! to trigger a rebuild when the input spec is modified ( #16 )
...
* use include_str! to trigger a rebuild when the input spec is modified
* update deps including typify
2021-11-16 18:00:55 -08:00
Adam Leventhal
37a530ba4f
unwind local typify ( #15 )
2021-11-09 23:38:36 -08:00
Adam H. Leventhal
75b224c047
Handle operations whose response is a `null`
2021-11-09 23:27:07 -08:00
Adam Leventhal
a3fbbc06ba
fixes to support omicron clients ( #14 )
2021-11-06 23:24:03 -07:00
Adam Leventhal
05dcf08091
update for typify ( #13 )
2021-11-02 11:16:55 -07:00
Adam Leventhal
7934be90b9
a variety of improvements to support omicron clients ( #12 )
...
- add the start of a client support crate
- add support for pre/post request hooks with consumer-specific data
- suggest type names for parameter and response types in case those
types are unnamed
- handle more reference types by resolving them properly
- improve optional parameter generation
2021-10-29 07:16:39 -07:00
Adam Leventhal
97857c347c
convert from executable -> executable + library with macro and builder options ( #9 )
2021-10-17 10:40:22 -07:00
Adam H. Leventhal
62d2acf0aa
update rustfmt-wrapper to crates.io
2021-10-09 08:55:04 -07:00
Adam Leventhal
3fe0029f5d
minor cleanup ( #8 )
2021-10-09 08:38:01 -07:00
Adam Leventhal
273120683b
Improve parameter types ( #7 )
2021-10-07 23:19:51 -07:00
Joshua M. Clulow
57ac1d606f
update dependencies (includes several typify improvements)
2021-10-07 18:36:21 -07:00
Joshua M. Clulow
270745257f
Client should be Clone, and should support .byte_stream() on responses
2021-10-04 21:50:43 -07:00
Adam Leventhal
7e16140b78
improved whitespace handling ( #6 )
2021-10-03 21:14:01 -07:00
Adam Leventhal
874f959a75
Add a newline between items ( #5 )
2021-10-03 20:31:53 -07:00
Adam Leventhal
865dbd4be4
migrate to typify and use quote ( #4 )
2021-10-02 11:40:03 -07:00
Joshua M. Clulow
eec74acf18
basic handling of "HashMap<String, String>" from dropshot
2021-10-01 22:09:10 -07:00
Adam Leventhal
3548096bdd
update to openapiv3 1.0.0-beta.1 to get (and test) some useful new bits ( #3 )
2021-09-25 16:57:55 -07:00
Joshua M. Clulow
01f184f8fe
use the uuid crate if we detect a uuid
2021-09-23 13:54:42 -07:00
Joshua M. Clulow
2a319675b1
path parameters first, by position; then query parameters, by name
2021-09-17 21:17:21 -07:00
Joshua M. Clulow
aab5061b56
type definitions should occur in a stable order (rustfmt)
2021-09-17 21:16:28 -07:00
Joshua M. Clulow
abf423f96c
if there are no defined responses, return a raw Response
2021-09-17 21:14:49 -07:00
Joshua M. Clulow
9ff59e812d
fix broken template test
2021-09-17 21:13:06 -07:00
Joshua M. Clulow
a4f920bd30
clippy warnings
2021-09-17 18:48:14 +00:00
Joshua M. Clulow
580b1c90a2
type definitions should occur in a stable order
2021-09-17 18:45:12 +00:00
Joshua M. Clulow
179dee4aaf
rustfmt
2021-09-17 18:44:11 +00:00
Joshua M. Clulow
5e8b9d0e8c
add new_with_client() constructor that accepts reqwest Client
2021-09-15 06:42:32 +00:00
Joshua M. Clulow
8409a6dced
use &str not String for method parameters
2021-09-15 06:42:12 +00:00
Joshua M. Clulow
afff057f00
omit missing optionals from JSON, rather than sending null
2021-09-15 06:41:31 +00:00
Joshua M. Clulow
2e5e7a1743
make structs cloneable
2021-09-15 06:40:32 +00:00
Joshua M. Clulow
9c99612b9a
basic support for query parameters (fix typo in clippy fix)
2021-09-14 22:41:42 +00:00
Joshua M. Clulow
47164b2de2
basic support for query parameters
2021-09-14 22:26:36 +00:00
Joshua M. Clulow
c707aa81e1
chrono import should be conditional and needs the serde feature
2021-09-01 18:56:51 +00:00
Joshua M. Clulow
7dea480b37
references for parameter types, improved newtype handling
2021-09-01 18:40:26 +00:00
Joshua M. Clulow
308f96fe60
query parameters dont actually work just yet
2021-09-01 18:39:26 +00:00
Joshua M. Clulow
deace5928c
basic handling of String newtypes and enumerations
2021-08-31 07:27:09 +00:00
Joshua M. Clulow
dd73bac4c0
load request/response body types, emit entire crate
2021-07-02 03:29:25 +00:00
Joshua M. Clulow
4b0c2cec68
contain declared model types in a "types" module
2021-07-02 00:56:53 +00:00
Joshua M. Clulow
dc05524823
URI encoding for path parameters
2021-07-02 00:56:17 +00:00
Joshua M. Clulow
f1d477390c
stable order for property names in generated structs
2021-07-02 00:54:42 +00:00