Cyborus
cad6890128
remove structs that only exist for their additional
field
2024-03-15 18:13:24 -04:00
Cyborus
d1aa5af564
adjust created user's email in test
2024-03-15 16:07:23 -04:00
Cyborus
ea4320cfb5
set enum variant serialization names
2024-03-15 16:06:49 -04:00
Cyborus
c2306c9709
update tests
2024-03-15 15:29:21 -04:00
Cyborus
205ab93499
remove debug
2024-03-15 14:47:02 -04:00
Cyborus
fdcf4a4c2e
default to serde_json::Value
for empty schemas
2024-03-15 14:45:56 -04:00
Cyborus
a30f114064
derive Copy
and Eq
for enums
2024-03-15 14:32:07 -04:00
Cyborus
5431303ecb
don't implement as_str
for enums that don't need it
2024-03-15 14:28:28 -04:00
Cyborus
7938d81544
split generation into method and struct files
2024-02-09 23:28:23 -05:00
Cyborus
07806529f9
fix warnings
2024-02-09 22:50:50 -05:00
Cyborus
ed27e3d714
remove trailing doc comment lines
2024-02-09 22:49:32 -05:00
Cyborus
e53fa0b631
format
2024-02-09 22:43:33 -05:00
Cyborus
3f1458e1be
even more strongly typed returns
2024-02-09 22:39:32 -05:00
Cyborus
8cf3213267
deref more params
2024-02-09 19:22:26 -05:00
Cyborus
0ea0f6ee57
include enum types in fields
2024-02-09 19:21:53 -05:00
Cyborus
43f853dad3
add enum types in query structs
2024-02-09 18:24:43 -05:00
Cyborus
945647baf1
generate subtypes and enums
2024-02-09 17:39:06 -05:00
Cyborus
4d63cd09c1
better document structs
2024-02-09 17:02:42 -05:00
Cyborus
11c0798775
better documentation for body params
2024-02-09 16:10:02 -05:00
Cyborus
7bab7c4a5f
deref params in method doc generation
2024-02-09 15:50:27 -05:00
Cyborus
c51e080214
support non-json return types
2024-02-09 15:29:34 -05:00
Cyborus
cb1f2d9ae8
strongly typed header returns
2024-02-09 14:37:43 -05:00
Cyborus
311e17e3ba
more general dereferencing
2024-01-30 16:45:53 -05:00
Cyborus
2b1e6a8aae
format
2024-01-29 22:13:20 -05:00
Cyborus
4ccdce0395
fix warnings
2024-01-29 22:12:52 -05:00
Cyborus
787adac1a4
put query
directly in format string
2024-01-29 22:05:31 -05:00
Cyborus
19a0dc3a60
improve openapi verification
2024-01-29 21:56:20 -05:00
Cyborus
2c467ea6cf
split generator into modules
2024-01-27 13:00:11 -05:00
Cyborus
412ad8caa1
remove debug panic
2024-01-27 11:55:34 -05:00
Cyborus
e2aba79ce0
format
2024-01-24 16:55:40 -05:00
Cyborus
1ba9b4a897
generate code
2024-01-24 16:37:52 -05:00
Cyborus
48eee70c88
fix errors/warnings in generated code
...
remove import of `Write`
remove now unused output string in display impls
access query fields by reference
remove `r#` in vars accessed in format strings
replace char literals in write macros with strings
2024-01-24 16:31:34 -05:00
Cyborus
bcfe3e1e6c
Merge pull request 'autogen improvements' ( #39 ) from Aviac/forgejo-api:aviac/autogen into autogen
...
Reviewed-on: https://codeberg.org/Cyborus/forgejo-api/pulls/39
2024-01-24 21:04:50 +00:00
aviac
5cabd12eb6
fix(mistake): order of statements
...
Authored-by: Aviac <aviac@mailbox.org>
2024-01-24 21:43:03 +01:00
aviac
a7299ab841
fix(list): adjust broken generated code
...
Authored-by: Aviac <aviac@mailbox.org>
2024-01-23 09:31:55 +01:00
aviac
a680fd9212
chore(cleanup): remove comment
...
Authored-by: Aviac <aviac@mailbox.org>
2024-01-23 09:23:46 +01:00
aviac
9566d232bf
feat(formatting): auto run rustfmt on generated file
...
Authored-by: Aviac <aviac@mailbox.org>
2024-01-22 09:21:46 +01:00
aviac
32b6a3d110
chore(cleanup): consolidate writeln
s
...
Authored-by: Aviac <aviac@mailbox.org>
2024-01-22 09:11:24 +01:00
aviac
1b6cd3467a
feat(definitions): impl Display
...
Instead of adding a `to_string` method on each definition struct, this
commit implements `Display`. This shouldn't result in any breaking
changes since the trait also exposes a method with the same name.
I also tried to format the generated text here and there to make it more
readable in the generate code base as well as in the generate text.
Authored-by: Aviac <aviac@mailbox.org>
2024-01-22 09:01:09 +01:00
aviac
331bb80acf
fix(typo?): remove weird line
...
Authored-by: Aviac <aviac@mailbox.org>
2024-01-22 09:01:09 +01:00
Cyborus
37db499785
replace hook type with gitea
...
makes tests on forgejo development branches pass
2024-01-21 17:07:11 -05:00
Cyborus
26303fc1f8
put test repo in current dir instead of root
2024-01-21 16:05:15 -05:00
Cyborus
8d3738af50
special-case ssh_url
to not be a url::Url
2024-01-21 16:03:44 -05:00
Cyborus
996c722f90
support returning header values
2024-01-21 16:03:11 -05:00
Cyborus
99ae09c8d3
format format format
2024-01-19 12:21:06 -05:00
Cyborus
63c6dc9f7f
fix http methods
2024-01-18 18:15:09 -05:00
Cyborus
194a1b5e36
handle datetime (de)serialization
2024-01-18 18:10:05 -05:00
Cyborus
bfb31fc296
add trailing slash to api prefix
2024-01-18 17:53:11 -05:00
Cyborus
ec3a9e74c4
strip leading slash
...
a leading slash causes `url::Url` to replace the entire existing path
2024-01-18 17:45:03 -05:00
Cyborus
83c236a02f
restructure tests
2024-01-18 17:16:52 -05:00