Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 419 #420

Merged
merged 2 commits into from
May 9, 2023
Merged

Fix 419 #420

merged 2 commits into from
May 9, 2023

Conversation

cvereterra
Copy link
Contributor

@cvereterra cvereterra commented May 8, 2023

Addresses #419

Added a check to see if we have filtered out all props

// Check if any of the props are readOnly or writeOnly schemas
const propertyNames = Object.keys(props);
const filteredPropertyNames = propertyNames.filter((name) => {
  const schema = props[name];
  if (!onlyMode)
    return (
      !this.isSchemaReadOnly(schema) && !this.isSchemaWriteOnly(schema)
    );
  if (onlyMode === "readOnly") return this.isSchemaReadOnly(schema);
  else if (onlyMode === "writeOnly") return this.isSchemaWriteOnly(schema);
});
// By filtering by readOnly/writeOnly props, we may have filtered out all props in schemas
const hasFilteredAllProps = filteredPropertyNames.length === 0;
const names = hasFilteredAllProps ? propertyNames : filteredPropertyNames;

@Xiphe
Copy link
Collaborator

Xiphe commented May 9, 2023

Awesome! Thanks for notifying and fixing this so fast!

@Xiphe Xiphe merged commit 44848a2 into oazapfts:main May 9, 2023
@github-actions
Copy link

github-actions bot commented May 9, 2023

🎉 This PR is included in version 4.7.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants