Skip to content

Commit

Permalink
(fix): dont error if required literal parameters are unspecified (#3921)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi authored Jun 24, 2024
1 parent ae70ee7 commit 7d518b8
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ export function validateObjectExample({
// ensure required properties are present
const requiredProperties = allPropertiesForObject.filter((property) => !property.isOptional);
for (const requiredProperty of requiredProperties) {
// dont error on literal properties
if (
requiredProperty.resolvedPropertyType._type === "container" &&
requiredProperty.resolvedPropertyType.container._type === "literal"
) {
continue;
}

if (example[requiredProperty.wireKey] == null) {
const propertyReference =
breadcrumbs.length > 0
Expand Down

0 comments on commit 7d518b8

Please sign in to comment.