Closed austinvalle closed 11 months ago
Will have another PR coming up with more error handling, but the general idea behind the logging will be more descriptive errors to help identify where in the OAS the problem is. Example for an int/string multi-type:
time=2023-09-28T15:54:35.502-04:00 level=WARN msg="skipping resource schema mapping" resource=deployment_v1 err="[integer, string] - unsupported multi-type schema, attribute cannot be created" oas_property=spec.strategy.rollingUpdate.maxSurge oas_line_number=879
Not sure if it'll be an issue, but I bumped to 1.21
to use the stable log/slog
. It's not a hard requirement for the logging so I can swap it and downgrade later if it's a problem 👍🏻
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
This PR:
stdout
as an option for outputting the IR, related PR for removing docs in common: https://github.com/hashicorp/terraform-docs-common-internal/pull/190go 1.21
forlog/slog
codegen-spec
and adds version fieldNotes
For OpenApi Specs that have circular references (like my example below with stripe's OAS), you'll now receive a warning like below:
This may result in a later error, but not always, which is why it's not considered a "fail" use-case 😄