Commit Graph

50 Commits

Author SHA1 Message Date
Emil Lerch 99a61c0bd2
update aws-zig to zig 0.12.0 (example will still fail)
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Failing after 2m25s Details
2024-04-22 08:23:01 -07:00
Emil Lerch d442671275
upgrade `zig build gen` build command to zig 0.12
This removes the copied Package.zig as we can now use the actual package
manager and look at our available dependencies in build.zig. This may
break again later as I believe lazy dependencies are planned, which will
have us search for a solution to tell the build system we're expecting
this dependency.
2024-03-30 15:26:24 -07:00
Emil Lerch 79d73cf09f
support for enum, document, and...dear lord...unit 2024-02-29 13:53:32 -08:00
Emil Lerch 3a027b6cd9
codegen support for more reserved words 2024-02-29 13:49:57 -08:00
Emil Lerch 69d8151ac8
make sigv4_name and arn_namespace optional 2024-02-29 13:49:21 -08:00
Emil Lerch 2db4188dbc
more logging to help codegen debug 2024-02-29 13:46:58 -08:00
Emil Lerch 2c9a80e363
update snake case to handle space followed by single character at end of string 2024-02-29 13:43:48 -08:00
melhindi 7a5fa0bb2e Replace var with const where applicable
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Successful in 7m37s Details
2024-01-18 13:43:45 +01:00
Emil Lerch e8bfd0af6d
codegen: clean up generated file names
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Successful in 8m22s Details
2023-09-06 12:11:12 -07:00
Emil Lerch fb36dc83d5
skip processing if all hashes match
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Successful in 7m8s Details
2023-08-25 17:20:51 -07:00
Emil Lerch a58a2cba41
adjustments in prep for hash optimization 2023-08-25 15:34:52 -07:00
Emil Lerch 26daedbd72
rename model readme as project does not have its own readme 2023-08-25 14:52:00 -07:00
Emil Lerch 6a109f2a5a
update model readme 2023-08-25 14:51:33 -07:00
Emil Lerch 2f36f82363
factor out hashing so we can use it in codegen 2023-08-25 14:43:40 -07:00
Emil Lerch db4037111f
use copied package manager to fetch models
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Successful in 7m18s Details
With this commit, I have copied a significant amount of package
manager code from zig 0.11 that was not included in the standard
library. This code is in Package.zig, and was augmented/adjusted
to handle the use case of arbitrary data files rather than the
specialized zig project use case of the package manager. It
arguably should be in a seperate repo, but we can move this later
if needed.
2023-08-25 11:31:18 -07:00
Emil Lerch bad00517a3
create path if it does not exist
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Failing after 2m34s Details
2023-08-15 07:38:57 -07:00
Emil Lerch c3da8c067f
only close if opened
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Failing after 1m33s Details
2023-08-15 07:26:14 -07:00
Emil Lerch 4dacca2d46
introduce verbosity 2023-08-14 22:56:19 -07:00
Emil Lerch 3b249d62b9
better codegen but without caching
AWS-Zig Build / build-zig-0.11.0-amd64-host (push) Failing after 2m4s Details
2023-08-14 22:38:37 -07:00
Emil Lerch 6b97fed499
codegen: revert build to mostly stock, update to 0.11 2023-08-14 16:24:51 -07:00
Emil Lerch 5ee53a493d
some codegen changes needed/investigation into http_query (see note)
This fixes main compile issues. Problems that remain:

* json is borked for objects with key/value keys that need to be coerced
* currently all request structures need an http_query declaration, and this may be a hard requirement
* need to revisit all the places where we are reading http response bodies
* there are 35 compile errors that do not have reference traces and will take a while to track down
2023-08-05 12:41:04 -07:00
Emil Lerch c2dc55c8ff
move smithy outside repo (what about this test.json) 2023-08-04 16:37:46 -07:00
Emil Lerch cfdf4a3141
these are old changes, but I believe part of 0.11 from a while back 2023-08-04 10:06:54 -07:00
Emil Lerch 803581f647
add http_payload type declaration based on smithy model 2022-05-28 18:00:38 -07:00
Emil Lerch 611849bde6
add codegen exception for cloudfront/adjust iot sitewise 2022-05-28 17:59:22 -07:00
Emil Lerch f374df3fa1
update generated models for xml mappings 2022-02-10 15:13:44 -08:00
Emil Lerch 1c41737202
upgrade to zig 0.9.0
continuous-integration/drone/push Build is passing Details
2022-01-03 08:06:14 -08:00
Emil Lerch 86b8815051
resolve most recursive type warnings in generator (ssm still has 2)
continuous-integration/drone/push Build is passing Details
2021-09-06 15:43:14 -07:00
Emil Lerch c6b3f8d6e1
adjust whitespace on generated code 2021-09-05 14:32:20 -07:00
Emil Lerch 80a76b0998
add jsonStringify implementation 2021-09-05 14:31:38 -07:00
Emil Lerch f612b3798a
include std and serializeMap from json.zig in generated code 2021-09-05 13:10:48 -07:00
Emil Lerch 0368c27c2c
move to state parameter and index level rather than prefix
This also includes a small change to force output of mappings even if empty
New zig correctly detects that without any field, we end up trying to use
a constant that does not exist (this is in the generated code)
2021-09-05 13:09:22 -07:00
Emil Lerch 7f178bcc91
provide ability to handle requests built at runtime
continuous-integration/drone/push Build is failing Details
This commit adds a new interface that is capable of runtime
use. By calling Request(action).call(request, options), the request
object can now be built at runtime. This change also moves the client
object into the options structure. It also moves the metaInfo generated
function to a type-based function rather than requiring an instance for
binding.
2021-08-24 17:02:28 -07:00
Emil Lerch 8e853e9a82
rest json v1 basic requests (responses tbd)
continuous-integration/drone/push Build is passing Details
This provides initial implementation with some basic calls
working. Only GET requests have been verified so far.
Http header support missing. POST/PUT might work, but
have not been tested. Currently the demo tests are
failing due to a response deserialization issue that
is still being debugged
2021-08-13 18:12:05 -07:00
Emil Lerch 6f53ed6dcf
http trait necessary for rest json support
continuous-integration/drone/push Build is passing Details
2021-08-13 11:03:11 -07:00
Emil Lerch 17b0ae9551
provide smithy-based json serialization for request data
continuous-integration/drone/push Build is passing Details
This will use the actual structure name or the override
from the trait as needed. Return value support
is also enabled in the code generation but not in
aws.zig. The current fuzzy checks should get most
of the way there though
2021-08-13 10:28:29 -07:00
Emil Lerch f21ce40186
include proper service name and use it 2021-08-12 17:51:07 -07:00
Emil Lerch 00b2ab3d27
initial support for json 1.0 2021-08-12 14:24:24 -07:00
Emil Lerch c7bff8a5e7
correct remaining to_snake issues in service manifest 2021-07-23 14:04:12 -07:00
Emil Lerch dfa0be60b9
update code generation without containing struct
continuous-integration/drone/push Build is failing Details
Instead we will rely here on the implicit struct provided by the file
itself. This means that when the service_manifest.zig import is
assigned, we don't end up with a construct like "manifest.sts.sts" to
get to the sts service. This simplifies greatly the way that
servicemodel.zig needs to behave.

One down side, however, is that the structure does not seem
accessible with the current zig language, making metaInfo unable
to access itself as it did before. Or maybe it can, I just can't find
it. So, this change also adds a new "service_metadata" public constant
with the same declarations being published at the file level, and
that is the new return from the metaInfo function. Our aws.zig
only really needs the action and that metadata, so we're ok with that
even if there is some duplication (we could codegen pointers over, and
maybe should to save a little bit of space).
2021-06-30 13:40:20 -07:00
Emil Lerch de41b456d3
address unused variable in generated metaInfo function 2021-06-30 09:12:34 -07:00
Emil Lerch 267e72051d
make services direct imports/pub const in generated service manifest 2021-06-30 09:11:53 -07:00
Emil Lerch 9c3be78d9f
address new compilation errors introduced in zig cf65ab8 2021-06-30 09:10:08 -07:00
Emil Lerch ad7aa96678
use new smithy package in generated code 2021-06-30 09:07:35 -07:00
Emil Lerch ac07c9300f
extract smithy to separate package 2021-06-30 09:05:21 -07:00
Emil Lerch 22e39dd6e1
allow for spaces in the name to be "handled" (ignored) 2021-06-29 17:19:34 -07:00
Emil Lerch aa5b46c046
move codegen out of src - we will handle differently 2021-06-29 17:10:01 -07:00
Emil Lerch c2710be165
move codegen under src/ 2021-06-03 17:35:14 -07:00
Emil Lerch f997907bf1
add traits everywhere/make "required" fixes/add ec2_query_name/json_name 2021-05-29 21:04:35 -07:00
Emil Lerch f068dce413
codegen all the things 2021-05-29 18:17:45 -07:00