Closed austinvalle closed 1 year ago
Generated IR JSON files are all up to date 👍🏻 - you can now see how many attributes were being incorrectly marked as required 😆
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.
Closes #11
(Should merge following #10 to see better diffs on the generated filed 👍🏻)
This PR introduces a
GlobalSchemaOpts
struct andOverrideComputability
field that is recursively passed through an OASSchema as it is building resource + data source attributes.This allows us to override an OAS's
required
property when it doesn't make sense to check it, like in the case of aGET
response body marking fields as required.If you look at
internal/cmd/testdata/github/generated_framework_ir.json
in this PR, you can see it now better reflects the actual POST API requirements for a repo, where:owner
andrepo
are required for the READ/data source, see REST API docsname
is required for the POST/resource, see REST API docsNote
behavior
in favor ofcomputability
when referring to theComputed
,Optional
,Required
combinations.