schema-components - v3.7.0
    Preparing search index...

    Function stripInapplicableConstraints

    • Return a copy of the schema with constraint keywords that don't apply to the given type removed. Meta keywords (description, title, etc.) and composition keywords are always preserved.

      Parameters

      • schema: Record<string, unknown>
      • targetType: string

      Returns Record<string, unknown>