diff --git a/schema/2.0/cyclonedx-2.0.schema.json b/schema/2.0/cyclonedx-2.0.schema.json index 8e7573861..1465a6b70 100644 --- a/schema/2.0/cyclonedx-2.0.schema.json +++ b/schema/2.0/cyclonedx-2.0.schema.json @@ -16,7 +16,6 @@ "type": "string" }, "specFormat": { - "type": "string", "title": "Specification Format", "description": "Specifies the format. This value shall be \"CycloneDX\".", "enum": [ diff --git a/schema/2.0/model/cyclonedx-ai-modelcard-2.0.schema.json b/schema/2.0/model/cyclonedx-ai-modelcard-2.0.schema.json index 6153a03c4..33bf4891b 100644 --- a/schema/2.0/model/cyclonedx-ai-modelcard-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-ai-modelcard-2.0.schema.json @@ -30,7 +30,6 @@ "additionalProperties": false, "properties": { "type": { - "type": "string", "title": "Learning Type", "description": "Learning types describing the learning problem or hybrid learning problem.", "enum": [ @@ -232,7 +231,6 @@ "additionalProperties": false, "properties": { "activity": { - "type": "string", "title": "Activity", "description": "The type of activity that is part of a machine learning model development or operational lifecycle.", "enum": [ @@ -305,7 +303,6 @@ "description": "Quantity of energy." }, "unit": { - "type": "string", "enum": [ "kWh" ], "title": "Unit", "description": "Unit of energy.", @@ -331,7 +328,6 @@ "description": "Quantity of carbon dioxide (CO2)." }, "unit": { - "type": "string", "enum": [ "tCO2eq" ], "title": "Unit", "description": "Unit of carbon dioxide (CO2).", @@ -368,7 +364,6 @@ "$ref": "cyclonedx-common-2.0.schema.json#/$defs/organizationalEntity" }, "energySource": { - "type": "string", "enum": [ "coal", "oil", diff --git a/schema/2.0/model/cyclonedx-behavior-2.0.schema.json b/schema/2.0/model/cyclonedx-behavior-2.0.schema.json index ca2b5ca24..36cd4cf17 100644 --- a/schema/2.0/model/cyclonedx-behavior-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-behavior-2.0.schema.json @@ -73,7 +73,6 @@ } }, "trigger": { - "type": "string", "title": "Trigger", "description": "The condition or event that initiates a behavior.", "enum": [ @@ -104,7 +103,6 @@ } }, "ordering": { - "type": "string", "title": "Ordering", "description": "Execution semantics for the nodes of a graph when transitions do not fully specify the order.", "enum": [ @@ -124,7 +122,6 @@ "description": "Indicates how the behavior or graph was identified. Multiple values indicate the behavior was both declared and observed.", "uniqueItems": true, "items": { - "type": "string", "enum": [ "declared", "observed" @@ -159,7 +156,6 @@ "description": "A description of the graph and the behaviour it models." }, "kind": { - "type": "string", "title": "Kind", "description": "An optional hint at the intent of the graph.", "enum": [ @@ -253,7 +249,6 @@ "$ref": "cyclonedx-common-2.0.schema.json#/$defs/refType" }, "kind": { - "type": "string", "title": "Kind", "description": "The kind of node.", "enum": [ @@ -328,7 +323,6 @@ "description": "For an event node, the nature of the event, reusing the trigger vocabulary, such as signal, scheduled, or event-driven." }, "gatewayKind": { - "type": "string", "title": "Gateway Kind", "description": "For a gateway node, the branching semantics applied across its outgoing transitions.", "enum": [ diff --git a/schema/2.0/model/cyclonedx-blueprint-2.0.schema.json b/schema/2.0/model/cyclonedx-blueprint-2.0.schema.json index 28a4937b0..58cd5a7e9 100644 --- a/schema/2.0/model/cyclonedx-blueprint-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-blueprint-2.0.schema.json @@ -212,7 +212,6 @@ "description": "The type of model being represented, either a predefined value from the enumeration or a custom name and description for types not covered by the enumeration. Threat, risk, and privacy analyses are represented in their own models, which reference the blueprint, rather than as blueprint model types.", "oneOf": [ { - "type": "string", "title": "Predefined Model Type", "description": "A predefined model type from the enumeration.", "enum": [ @@ -421,7 +420,6 @@ "description": "The kind of asset. Use the custom option for kinds not covered by the enumeration.", "oneOf": [ { - "type": "string", "title": "Predefined Asset Type", "enum": [ "actor", @@ -651,7 +649,6 @@ "description": "The type of data store. Use the custom option for technologies not covered by the enumeration.", "oneOf": [ { - "type": "string", "title": "Predefined Data Store Type", "enum": [ "block", @@ -913,7 +910,6 @@ "description": "The type of interface. Use the custom option for types not covered by the enumeration.", "oneOf": [ { - "type": "string", "title": "Predefined Interface Type", "enum": [ "rest", @@ -1014,7 +1010,6 @@ "description": "The type of zone. Use the custom option for types not covered by the enumeration.", "oneOf": [ { - "type": "string", "title": "Predefined Zone Type", "enum": [ "availability", @@ -1121,7 +1116,6 @@ "description": "The type of boundary. Use the custom option for types not covered by the enumeration.", "oneOf": [ { - "type": "string", "title": "Predefined Boundary Type", "enum": [ "data", @@ -1445,7 +1439,6 @@ "description": "The type of flow. Use the custom option for types not covered by the enumeration.", "oneOf": [ { - "type": "string", "title": "Predefined Flow Type", "enum": [ "control", @@ -1649,7 +1642,6 @@ "description": "The topic of the assumption. Use the custom option for topics not covered by the enumeration.", "oneOf": [ { - "type": "string", "title": "Predefined Assumption Topic", "enum": [ "availability", @@ -1703,7 +1695,6 @@ "description": "References using bom-link or bom-ref to the assets that are directly affected by or dependent on this assumption, enabling impact analysis when the assumption's validity changes." }, "validity": { - "type": "string", "title": "Validity", "enum": [ "invalid", @@ -1779,7 +1770,6 @@ "description": "URL to the diagram if stored externally." }, "level": { - "type": "string", "title": "Level", "enum": [ "detailed", @@ -1837,7 +1827,6 @@ "additionalProperties": false, "properties": { "type": { - "type": "string", "title": "Type", "enum": [ "activity", @@ -1954,7 +1943,6 @@ "description": "The authentication method or protocol used to verify identity, either a predefined value from the enumeration or a custom object describing a method not covered by the enumeration.", "oneOf": [ { - "type": "string", "title": "Predefined Authentication Type", "description": "A predefined authentication method from the enumeration.", "enum": [ @@ -2049,7 +2037,6 @@ "description": "The authorization model used to determine and enforce access permissions, either a predefined value from the enumeration or a custom object describing a model not covered by the enumeration.", "oneOf": [ { - "type": "string", "title": "Predefined Authorization Type", "description": "A predefined authorization model from the enumeration.", "enum": [ diff --git a/schema/2.0/model/cyclonedx-common-2.0.schema.json b/schema/2.0/model/cyclonedx-common-2.0.schema.json index 6e53d544b..7c2e52305 100644 --- a/schema/2.0/model/cyclonedx-common-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-common-2.0.schema.json @@ -81,7 +81,6 @@ } }, "hashAlgorithm": { - "type": "string", "title": "Hash Algorithm", "description": "The algorithm that generated the hash value.", "enum": [ @@ -132,7 +131,6 @@ "$ref": "#/$defs/mediaType" }, "encoding": { - "type": "string", "title": "Encoding", "description": "Specifies the optional encoding the text is represented in.", "enum": [ @@ -191,7 +189,6 @@ "description": "A comment describing the external reference" }, "type": { - "type": "string", "title": "Type", "description": "Specifies the type of external reference.", "enum": [ @@ -452,7 +449,6 @@ "description": "The lifecycle or transformation stage of the subject to which this origin applies. When omitted, the origin describes the subject as a whole.", "oneOf": [ { - "type": "string", "title": "Predefined Origin Stage", "description": "An origin stage drawn from the predefined set.", "enum": [ @@ -724,7 +720,6 @@ "additionalProperties": false, "properties": { "phase": { - "type": "string", "title": "Phase", "description": "A pre-defined phase in the product lifecycle.", "enum": [ @@ -807,7 +802,6 @@ "additionalProperties": false, "properties": { "type": { - "type": "string", "enum": [ "unofficial", "monkey", @@ -865,7 +859,6 @@ "additionalProperties": false, "properties": { "type": { - "type": "string", "enum": [ "defect", "enhancement", diff --git a/schema/2.0/model/cyclonedx-component-2.0.schema.json b/schema/2.0/model/cyclonedx-component-2.0.schema.json index af1b29efd..8960f8893 100644 --- a/schema/2.0/model/cyclonedx-component-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-component-2.0.schema.json @@ -21,7 +21,6 @@ "additionalProperties": false, "properties": { "type": { - "type": "string", "enum": [ "application", "framework", @@ -116,7 +115,6 @@ "description": "Specifies a description for the component" }, "scope": { - "type": "string", "enum": [ "required", "optional", @@ -400,7 +398,6 @@ "additionalProperties": false, "properties": { "type": { - "type": "string", "const": "component-choice", "title": "Type", "description": "Discriminator for a component-choice entry. The value shall be the literal string `component-choice`." @@ -422,7 +419,6 @@ "description": "A description of the choice and the rationale behind the alternates." }, "operator": { - "type": "string", "enum": [ "OR", "XOR", @@ -722,7 +718,6 @@ "description": "An identifier which can be used to reference the dataset elsewhere in the BOM. Every `bom-ref` must be unique within the BOM.\nValue SHOULD not start with the BOM-Link intro 'urn:cdx:' to avoid conflicts with BOM-Links." }, "type": { - "type": "string", "title": "Type of Data", "description": "The general theme or subject matter of the data being specified.", "enum": [ @@ -780,7 +775,6 @@ "additionalProperties": false, "properties": { "configurationSource": { - "type": "string", "title": "Configuration Source", "description": "Describes how this component's configuration was determined. Values are roughly ordered from least to most agile, the ordering is approximate.", "enum": [ @@ -816,7 +810,6 @@ "description": "The step or steps required to apply a change to this component's configuration. When more than one value is present, all are required (for example, a software update followed by a restart). Values are roughly ordered from least to most disruptive. Use a single value of 'not-possible' when the configuration cannot be changed.", "uniqueItems": true, "items": { - "type": "string", "enum": [ "not-possible", "hardware-replacement", @@ -899,7 +892,6 @@ "description": "The scheme under which an identifier is asserted. Either a predefined value or a custom scheme described by name and description.", "oneOf": [ { - "type": "string", "enum": [ "purl", "cpe", diff --git a/schema/2.0/model/cyclonedx-composition-2.0.schema.json b/schema/2.0/model/cyclonedx-composition-2.0.schema.json index 6ff555a10..821b8fdfd 100644 --- a/schema/2.0/model/cyclonedx-composition-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-composition-2.0.schema.json @@ -63,7 +63,6 @@ } }, "aggregateType": { - "type": "string", "default": "not_specified", "enum": [ "complete", diff --git a/schema/2.0/model/cyclonedx-control-2.0.schema.json b/schema/2.0/model/cyclonedx-control-2.0.schema.json index e7762a1e7..c378e5417 100644 --- a/schema/2.0/model/cyclonedx-control-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-control-2.0.schema.json @@ -45,7 +45,6 @@ "oneOf": [ { "title": "Predefined Control Category", - "type": "string", "enum": [ "preventive", "detective", @@ -144,7 +143,6 @@ "oneOf": [ { "title": "Predefined Implementation Status", - "type": "string", "enum": [ "recommended", "proposed", @@ -205,7 +203,6 @@ "description": "Effectiveness as a decimal from 0 to 1." }, "rating": { - "type": "string", "title": "Rating", "enum": [ "ineffective", diff --git a/schema/2.0/model/cyclonedx-cryptography-2.0.schema.json b/schema/2.0/model/cyclonedx-cryptography-2.0.schema.json index cb5c00f17..3b04182e9 100644 --- a/schema/2.0/model/cyclonedx-cryptography-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-cryptography-2.0.schema.json @@ -15,7 +15,6 @@ ], "properties": { "assetType": { - "type": "string", "title": "Asset Type", "description": "Cryptographic assets occur in several forms. Algorithms and protocols are most commonly implemented in specialized cryptographic libraries. They may, however, also be 'hardcoded' in software components. Certificates and related cryptographic material like keys, tokens, secrets or passwords are other cryptographic assets to be modelled.", "enum": [ @@ -38,7 +37,6 @@ "additionalProperties": false, "properties": { "primitive": { - "type": "string", "title": "primitive", "description": "Cryptographic building blocks used in higher-level cryptographic systems and protocols. Primitives represent different cryptographic routines: deterministic random bit generators (drbg, e.g. CTR_DRBG from NIST SP800-90A-r1), message authentication codes (mac, e.g. HMAC-SHA-256), blockciphers (e.g. AES), streamciphers (e.g. Salsa20), signatures (e.g. ECDSA), hash functions (e.g. SHA-256), public-key encryption schemes (pke, e.g. RSA), extended output functions (xof, e.g. SHAKE256), key derivation functions (e.g. pbkdf2), key agreement algorithms (e.g. ECDH), key encapsulation mechanisms (e.g. ML-KEM), authenticated encryption (ae, e.g. AES-GCM) and the combination of multiple algorithms (combiner, e.g. SP800-56Cr2).", "enum": [ @@ -99,7 +97,6 @@ "description": "The specific underlying Elliptic Curve (EC) definition employed which is an indicator of the level of security strength, performance and complexity. If specified, this value shall be one of the enumeration of valid elliptic curves identifiers defined in the `cryptography-defs.schema.json` subschema." }, "executionEnvironment": { - "type": "string", "title": "Execution Environment", "description": "The target and execution environment in which the algorithm is implemented in.", "enum": [ @@ -124,7 +121,6 @@ "title": "Implementation platforms", "description": "The target platforms for which the algorithm is implemented. The implementation can be 'generic', running on any platform or for a specific platform.", "items": { - "type": "string", "title": "Platform", "description": "The target platform for the implementation.", "enum": [ @@ -170,7 +166,6 @@ "title": "Certification Level", "description": "The certification that the implementation of the cryptographic algorithm has received, if any. Certifications include revisions and levels of FIPS 140 or Common Criteria of different Extended Assurance Levels (CC-EAL).", "items": { - "type": "string", "enum": [ "none", "fips140-1-l1", @@ -238,7 +233,6 @@ } }, "mode": { - "type": "string", "title": "Mode", "description": "The mode of operation in which the cryptographic algorithm (block cipher) is used.", "enum": [ @@ -291,7 +285,6 @@ } }, "padding": { - "type": "string", "title": "Padding", "description": "The padding scheme that is used for the cryptographic algorithm.", "enum": [ @@ -437,7 +430,6 @@ "additionalProperties": false, "properties": { "state": { - "type": "string", "title": "State", "description": "A pre-defined state in the certificate lifecycle.", "enum": [ @@ -545,7 +537,6 @@ "additionalProperties": false, "properties": { "commonExtensionName": { - "type": "string", "title": "name", "description": "The name of the extension.", "enum": [ @@ -616,7 +607,6 @@ "additionalProperties": false, "properties": { "type": { - "type": "string", "title": "relatedCryptoMaterialType", "description": "The type for the related cryptographic material.", "enum": [ @@ -668,7 +658,6 @@ "description": "The unique identifier for the related cryptographic material." }, "state": { - "type": "string", "title": "State", "description": "The key state as defined by NIST SP 800-57.", "enum": [ @@ -754,7 +743,6 @@ "additionalProperties": false, "properties": { "type": { - "type": "string", "title": "Type", "description": "The concrete protocol type.", "enum": [ @@ -1052,7 +1040,6 @@ } }, "cryptographicFunction": { - "type": "string", "title": "Cryptographic Function", "description": "A cryptographic function or usage.", "enum": [ @@ -1105,7 +1092,6 @@ "additionalProperties": false, "properties": { "automation": { - "type": "string", "title": "Automation", "description": "The degree of automation with which the operation is performed, ordered from least to most agile.", "enum": [ diff --git a/schema/2.0/model/cyclonedx-data-2.0.schema.json b/schema/2.0/model/cyclonedx-data-2.0.schema.json index 8e342a29f..a5822a81b 100644 --- a/schema/2.0/model/cyclonedx-data-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-data-2.0.schema.json @@ -425,7 +425,6 @@ "description": "Indicates whether the attribute carries sensitive content that warrants extra protection beyond the object-level classification, such as masking in logs or stricter access controls." }, "key": { - "type": "string", "title": "Key", "enum": [ "primary", @@ -478,7 +477,6 @@ "description": "Reference using bom-link or bom-ref to the related data object." }, "cardinality": { - "type": "string", "title": "Cardinality", "enum": [ "one-to-one", @@ -763,7 +761,6 @@ "description": "Classifies data by the level of protection it requires, either using a predefined classification level or a custom level not covered by the enumeration. Classification drives protection requirements such as access control, encryption, disclosure restrictions, and statutory handling obligations.", "oneOf": [ { - "type": "string", "title": "Predefined Classification", "description": "A predefined classification level from the enumeration.", "enum": [ @@ -819,7 +816,6 @@ "description": "Identifies a type of information contained in the data, either using a predefined value from the enumeration or a custom name and description for types not covered by the enumeration. A single dataset can contain multiple information types and is captured as an array on the data profile.", "oneOf": [ { - "type": "string", "title": "Predefined Information Type", "description": "A predefined information type from the enumeration.", "enum": [ diff --git a/schema/2.0/model/cyclonedx-evidence-2.0.schema.json b/schema/2.0/model/cyclonedx-evidence-2.0.schema.json index bfaf446ed..004d0578c 100644 --- a/schema/2.0/model/cyclonedx-evidence-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-evidence-2.0.schema.json @@ -253,7 +253,6 @@ } }, "analysisResult": { - "type": "string", "title": "Analysis Result", "description": "The outcome of a method of analysis.", "enum": [ @@ -357,7 +356,6 @@ "description": "The technique used in a method of analysis. The vocabulary spans both the identification of a subject, such as a component, and the assessment of a vulnerability, so that evidence is described consistently wherever it appears. Either a predefined value or a custom technique described by name and description.", "oneOf": [ { - "type": "string", "enum": [ "source-code-analysis", "binary-analysis", @@ -506,7 +504,6 @@ "description": "The kind of supporting material. Either a predefined value or a custom type described by name and description.", "oneOf": [ { - "type": "string", "enum": [ "request", "response", diff --git a/schema/2.0/model/cyclonedx-formulation-2.0.schema.json b/schema/2.0/model/cyclonedx-formulation-2.0.schema.json index 997dc6d9e..a30cd4cdf 100644 --- a/schema/2.0/model/cyclonedx-formulation-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-formulation-2.0.schema.json @@ -396,7 +396,6 @@ "accessMode": { "title": "Access mode", "description": "Describes the read-write access control for the workspace relative to the owning resource instance.", - "type": "string", "enum": [ "read-only", "read-write", @@ -454,7 +453,6 @@ "mode": { "title": "Mode", "description": "The mode for the volume instance.", - "type": "string", "enum": [ "filesystem", "block" ], @@ -529,7 +527,6 @@ "type": { "title": "Type", "description": "The source type of event which caused the trigger to fire.", - "type": "string", "enum": [ "manual", "api", @@ -733,7 +730,6 @@ "type": { "title": "Type", "description": "Describes the type of data output.", - "type": "string", "enum": [ "artifact", "attestation", @@ -843,7 +839,6 @@ } }, "taskType": { - "type": "string", "enum": [ "copy", "clone", diff --git a/schema/2.0/model/cyclonedx-jss_X590_2023_10-2.0.schema.json b/schema/2.0/model/cyclonedx-jss_X590_2023_10-2.0.schema.json index f1dcb7fc2..caf2995eb 100644 --- a/schema/2.0/model/cyclonedx-jss_X590_2023_10-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-jss_X590_2023_10-2.0.schema.json @@ -60,7 +60,6 @@ "title": "Signature Algorithm Type Vocabulary (signature-algorithm-type-ov)", "description": "NOTE – At the time of this writing quantum safe algorithms could come from those defined in XMSS [IETF RFC 8391] section 5.3 or LMS [IETF RFC 8554] section 5.1 and other algorithms could come from those defined in JWA [IETF RFC 7518] section 3.1 or [IETF RFC 8037] section 3.1 (see the table below for a list of values from those RFCs). While JWA [IETF RFC 7518] section 3.1 defines the following symmetric algorithms: HS256, HS384, and HS512, these algorithms SHOULD NOT be used. If one of these three symmetric algorithms is used, the sharing and transmission of those keys is out of scope for this Recommendation.", "$comment": "Normative source: ITU-T X.590 clause 6.2.2 and Table 1", - "type": "string", "enum": [ "XMSS-SHA2_10_256", "XMSS-SHA2_16_256", @@ -183,7 +182,6 @@ "title": "Type Indicator", "description": "The value of this property MUST be jss.", "$comment": "Normative source: ITU-T X.590 clause 6.3.1", - "type": "string", "const": "jss" }, "id": { diff --git a/schema/2.0/model/cyclonedx-license-2.0.schema.json b/schema/2.0/model/cyclonedx-license-2.0.schema.json index 2faa5543a..41d836b14 100644 --- a/schema/2.0/model/cyclonedx-license-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-license-2.0.schema.json @@ -162,7 +162,6 @@ "licenseAcknowledgementEnumeration": { "title": "License Acknowledgement", "description": "Declared licenses and concluded licenses represent two different stages in the licensing process within software development. Declared licenses refer to the initial intention of the software authors regarding the licensing terms under which their code is released. On the other hand, concluded licenses are the result of a comprehensive analysis of the project's codebase to identify and confirm the actual licenses of the components used, which may differ from the initially declared licenses. While declared licenses provide an upfront indication of the licensing intentions, concluded licenses offer a more thorough understanding of the actual licensing within a project, facilitating proper compliance and risk management. Observed licenses are defined in `@.evidence.licenses`. Observed licenses form the evidence necessary to substantiate a concluded license.", - "type": "string", "enum": [ "declared", "concluded" @@ -280,7 +279,6 @@ "title": "License Type", "description": "The type of license(s) that was granted to the licensee.", "items": { - "type": "string", "enum": [ "academic", "appliance", diff --git a/schema/2.0/model/cyclonedx-metadata-2.0.schema.json b/schema/2.0/model/cyclonedx-metadata-2.0.schema.json index 5da767611..949536873 100644 --- a/schema/2.0/model/cyclonedx-metadata-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-metadata-2.0.schema.json @@ -80,7 +80,6 @@ "tlpClassification": { "title": "Traffic Light Protocol (TLP) Classification", "description": "Traffic Light Protocol (TLP) is a classification system for identifying the potential risk associated with artefact, including whether it is subject to certain types of legal, financial, or technical threats. Refer to [https://www.first.org/tlp/](https://www.first.org/tlp/) for further information.\nThe default classification is \"CLEAR\"", - "type" : "string", "default": "CLEAR", "enum": [ "CLEAR", diff --git a/schema/2.0/model/cyclonedx-party-2.0.schema.json b/schema/2.0/model/cyclonedx-party-2.0.schema.json index b38625c8e..cea304798 100644 --- a/schema/2.0/model/cyclonedx-party-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-party-2.0.schema.json @@ -127,7 +127,6 @@ "additionalProperties": false, "properties": { "role": { - "type": "string", "title": "Role", "description": "A predefined role from the CycloneDX role taxonomy.", "enum": [ @@ -510,7 +509,6 @@ "oneOf": [ { "title": "Pre-Defined Kind", - "type": "string", "enum": [ "software-system", "hardware-system", @@ -597,7 +595,6 @@ "oneOf": [ { "title": "Pre-Defined Archetype", - "type": "string", "enum": [ "end-user", "power-user", @@ -675,7 +672,6 @@ ] }, "scope": { - "type": "string", "title": "Scope", "enum": [ "internal", @@ -734,7 +730,6 @@ "oneOf": [ { "title": "Pre-Defined Scheme", - "type": "string", "enum": [ "lei", "duns", diff --git a/schema/2.0/model/cyclonedx-patent-2.0.schema.json b/schema/2.0/model/cyclonedx-patent-2.0.schema.json index a97180786..3e545423a 100644 --- a/schema/2.0/model/cyclonedx-patent-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-patent-2.0.schema.json @@ -79,7 +79,6 @@ "description": "The date the patent expires. Derived from grant or filing date according to jurisdiction-specific rules." }, "patentLegalStatus": { - "type": "string", "title": "Legal Status", "description": "Indicates the current legal status of the patent or patent application, based on the WIPO ST.27 standard. This status reflects administrative, procedural, or legal events. Values include both active and inactive states and are useful for determining enforceability, procedural history, and maintenance status.", "enum": [ @@ -187,7 +186,6 @@ "description": "A reference to the patent or patent family object within the BOM. This must match the `bom-ref` of a `patent` or `patentFamily` object." }, "assertionType": { - "type": "string", "title": "Assertion Type", "description": "The type of assertion being made about the patent or patent family. Examples include ownership, licensing, and standards inclusion.", "enum": [ diff --git a/schema/2.0/model/cyclonedx-perspective-2.0.schema.json b/schema/2.0/model/cyclonedx-perspective-2.0.schema.json index 217cf5870..1005f0772 100644 --- a/schema/2.0/model/cyclonedx-perspective-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-perspective-2.0.schema.json @@ -120,7 +120,6 @@ } }, "perspectiveRelevance": { - "type": "string", "title": "Perspective Relevance", "description": "Indicates the importance of a data type to a perspective.", "enum": [ @@ -166,7 +165,6 @@ ] }, "preDefinedPerspectiveDomain": { - "type": "string", "title": "Pre-Defined Perspective Domain", "description": "A pre-defined domain or discipline to which a perspective applies. Domains span security disciplines, safety engineering, industry verticals, technology areas, compliance frameworks, and cross-cutting concerns.", "enum": [ diff --git a/schema/2.0/model/cyclonedx-physical-2.0.schema.json b/schema/2.0/model/cyclonedx-physical-2.0.schema.json index a93931842..5e784bcc0 100644 --- a/schema/2.0/model/cyclonedx-physical-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-physical-2.0.schema.json @@ -112,7 +112,6 @@ }, "preDefinedDeviceType": { - "type": "string", "title": "Predefined Device Type", "description": "Package or mounting style of the physical item, drawn from the predefined set.", "enum": [ @@ -187,7 +186,6 @@ }, "preDefinedMaterialForm": { - "type": "string", "title": "Predefined Material Form", "description": "Physical form in which the material is supplied, drawn from the predefined set.", "enum": [ @@ -262,7 +260,6 @@ "description": "Typical lead time as a numeric value in the specified unit." }, "unit": { - "type": "string", "enum": [ "days", "weeks", "months" ], "title": "Unit" }, diff --git a/schema/2.0/model/cyclonedx-requirement-2.0.schema.json b/schema/2.0/model/cyclonedx-requirement-2.0.schema.json index d141b1b67..de0b64357 100644 --- a/schema/2.0/model/cyclonedx-requirement-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-requirement-2.0.schema.json @@ -51,7 +51,6 @@ "uniqueItems": true }, "priority": { - "type": "string", "title": "Priority", "description": "The priority level of the requirement.", "enum": [ @@ -117,7 +116,6 @@ "description": "An estimation of the effort required to implement the requirement." }, "risk": { - "type": "string", "title": "Risk", "description": "The risk level associated with implementing or not implementing the requirement.", "enum": [ @@ -145,7 +143,6 @@ } }, "requirementType": { - "type": "string", "title": "Requirement Type", "description": "The category or classification applicable to the requirement.", "enum": [ @@ -202,7 +199,6 @@ } }, "requirementStatus": { - "type": "string", "title": "Status", "description": "The current status of the requirement in the development lifecycle.", "enum": [ @@ -234,7 +230,6 @@ "description": "A description of the acceptance criterion." }, "status": { - "type": "string", "title": "Status", "description": "The current status of the acceptance criterion.", "enum": [ @@ -264,7 +259,6 @@ ] }, "type": { - "type": "string", "title": "Dependency Type", "description": "The type of dependency relationship.", "enum": [ @@ -303,7 +297,6 @@ "description": "An identifier which can be used to reference the assertion elsewhere in the BOM. Every `bom-ref` must be unique within the BOM." }, "assertionType": { - "type": "string", "title": "Assertion Type", "description": "The type of assertion being made about the relationship between the component and the requirement.", "enum": [ diff --git a/schema/2.0/model/cyclonedx-risk-2.0.schema.json b/schema/2.0/model/cyclonedx-risk-2.0.schema.json index b32be1e6b..f522fe517 100644 --- a/schema/2.0/model/cyclonedx-risk-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-risk-2.0.schema.json @@ -56,7 +56,6 @@ "oneOf": [ { "title": "Predefined Risk Domain", - "type": "string", "enum": [ "security", "privacy", @@ -134,7 +133,6 @@ "oneOf": [ { "title": "Predefined Risk Attribute", - "type": "string", "enum": [ "accountability", "authentication", @@ -319,7 +317,6 @@ "oneOf": [ { "title": "Predefined Risk Status", - "type": "string", "enum": [ "identified", "assessed", @@ -423,7 +420,6 @@ "additionalProperties": false, "properties": { "level": { - "type": "string", "title": "Level", "description": "The qualitative likelihood level representing the overall assessed probability of the risk or scenario being realized.", "enum": [ @@ -505,7 +501,6 @@ { "title": "Predefined Likelihood Factor Type", "description": "A likelihood factor type defined by the CycloneDX standard, aligned with established risk assessment methodologies including FAIR, OWASP Risk Rating, and NIST SP 800-30.", - "type": "string", "enum": [ "attack-vector", "contact-frequency", @@ -560,7 +555,6 @@ ] }, "level": { - "type": "string", "title": "Level", "description": "The qualitative rating assigned to this factor, representing the assessed degree to which this factor contributes to the overall likelihood of the risk being realized.", "enum": [ @@ -611,7 +605,6 @@ "additionalProperties": false, "properties": { "level": { - "type": "string", "enum": [ "negligible", "low", @@ -629,7 +622,6 @@ } }, "polarity": { - "type": "string", "title": "Polarity", "description": "Whether the impact represents a harm or a benefit. Benefits support modeling opportunities and positive risk.", "enum": [ @@ -688,7 +680,6 @@ "oneOf": [ { "title": "Predefined Impact Category", - "type": "string", "enum": [ "confidentiality", "integrity", @@ -869,7 +860,6 @@ "additionalProperties": false, "properties": { "level": { - "type": "string", "enum": [ "info", "low", @@ -901,7 +891,6 @@ "oneOf": [ { "title": "Predefined Risk Methodology", - "type": "string", "enum": [ "dread", "fair", @@ -961,7 +950,6 @@ "description": "An identifier which can be used to reference this response elsewhere using a bom-ref or bom-link." }, "strategy": { - "type": "string", "title": "Strategy", "description": "The disposition chosen for the risk.", "enum": [ @@ -1003,7 +991,6 @@ "$ref": "cyclonedx-control-2.0.schema.json#/$defs/effectiveness" }, "cost": { - "type": "string", "title": "Cost", "enum": [ "trivial", @@ -1080,7 +1067,6 @@ "oneOf": [ { "title": "Predefined Assessment Type", - "type": "string", "enum": [ "security", "privacy", @@ -1150,7 +1136,6 @@ "oneOf": [ { "title": "Predefined Assessment Cadence", - "type": "string", "enum": [ "initial", "periodic", @@ -1205,7 +1190,6 @@ "oneOf": [ { "title": "Predefined Assessment Status", - "type": "string", "enum": [ "draft", "in-progress", @@ -1277,7 +1261,6 @@ "oneOf": [ { "title": "Predefined Aggregation Method", - "type": "string", "enum": [ "maximum", "sum", @@ -1364,7 +1347,6 @@ } }, "priority": { - "type": "string", "enum": [ "none", "low", @@ -1382,7 +1364,6 @@ } }, "criticality": { - "type": "string", "enum": [ "minimal", "low", @@ -1400,7 +1381,6 @@ } }, "appetiteLevel": { - "type": "string", "description": "A qualitative risk appetite level, ranging from risk-averse to risk-seeking.", "enum": [ "averse", diff --git a/schema/2.0/model/cyclonedx-threat-2.0.schema.json b/schema/2.0/model/cyclonedx-threat-2.0.schema.json index edc8748c3..5dc6b3404 100644 --- a/schema/2.0/model/cyclonedx-threat-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-threat-2.0.schema.json @@ -93,7 +93,6 @@ "description": "A threat modeling methodology applied to produce this threat model. Use the custom option for methodologies not covered by the enumeration.", "oneOf": [ { - "type": "string", "title": "Predefined Threat Modeling Methodology", "enum": [ "STRIDE", @@ -176,7 +175,6 @@ "description": "The nature of the threat source that gives rise to this threat, following the threat source types of [NIST SP 800-30](https://csrc.nist.gov/pubs/sp/800/30/r1/final). Use the custom option for an origin not covered by the enumeration.", "oneOf": [ { - "type": "string", "title": "Predefined Origin", "enum": [ "adversarial", @@ -227,7 +225,6 @@ "required": ["taxonomy", "category"], "properties": { "taxonomy": { - "type": "string", "title": "Taxonomy", "description": "The threat classification taxonomy that the category is drawn from.", "enum": ["STRIDE", "LINDDUN", "MAESTRO", "MITRE-ATTACK"], @@ -466,7 +463,6 @@ "uniqueItems": true, "description": "The motivations of the actor in this scenario.", "items": { - "type": "string", "enum": [ "financial", "political", @@ -498,7 +494,6 @@ } }, "intent": { - "type": "string", "title": "Intent", "description": "The intent of the actor in this scenario.", "enum": [ @@ -515,7 +510,6 @@ } }, "accessLevel": { - "type": "string", "title": "Access Level", "description": "The level of access the actor is assumed to have in this scenario.", "enum": [ @@ -625,7 +619,6 @@ "description": "A description of the threat profile." }, "sophistication": { - "type": "string", "title": "Sophistication", "description": "The level of technical sophistication an actor characterized by this profile is assumed to possess.", "enum": ["none", "minimal", "intermediate", "advanced", "expert"], @@ -638,7 +631,6 @@ } }, "resources": { - "type": "string", "title": "Resources", "description": "The level of resources an actor characterized by this profile is assumed to have available.", "enum": ["minimal", "limited", "moderate", "substantial", "unlimited"], @@ -671,7 +663,6 @@ "additionalProperties": false, "properties": { "type": { - "type": "string", "title": "Type", "description": "The context by which an attack is possible.", "enum": [ @@ -688,7 +679,6 @@ } }, "complexity": { - "type": "string", "title": "Complexity", "description": "The complexity of the attack.", "enum": [ @@ -701,7 +691,6 @@ } }, "privileges": { - "type": "string", "title": "Privileges", "description": "The level of privileges required to carry out the attack.", "enum": [ @@ -716,7 +705,6 @@ } }, "userInteraction": { - "type": "string", "title": "User Interaction", "description": "Whether the attack requires interaction from a user other than the attacker.", "enum": [ @@ -729,7 +717,6 @@ } }, "scope": { - "type": "string", "title": "Scope", "description": "Whether a successful attack affects resources beyond the vulnerable component.", "enum": [ @@ -906,7 +893,6 @@ "description": "A description of the node." }, "operator": { - "type": "string", "title": "Operator", "description": "Specifies how the nodes listed in 'children' combine to achieve this node. A value of 'and' requires every child node; a value of 'or' requires any single child node. For example, a node whose children are a phishing node and a credential-stuffing node uses 'or' when either alone achieves it, or 'and' when both are needed together. A node with no children is a leaf and omits this property.", "enum": [ @@ -936,7 +922,6 @@ "description": "Reference using bom-link or bom-ref to the weakness that this node exploits." }, "cost": { - "type": "string", "title": "Cost", "description": "The relative cost to an attacker of achieving this node.", "enum": [ @@ -955,7 +940,6 @@ } }, "skill": { - "type": "string", "title": "Skill", "description": "The skill level required to achieve this node.", "enum": [ @@ -974,7 +958,6 @@ } }, "detectability": { - "type": "string", "title": "Detectability", "description": "How readily an attempt to achieve this node can be detected.", "enum": [ @@ -1093,7 +1076,6 @@ "additionalProperties": false, "properties": { "level": { - "type": "string", "title": "Level", "description": "The maturity of available exploitation capability.", "enum": [ @@ -1110,7 +1092,6 @@ } }, "complexity": { - "type": "string", "title": "Complexity", "description": "The complexity of exploitation.", "enum": [ @@ -1129,7 +1110,6 @@ } }, "skillRequired": { - "type": "string", "title": "Skill Required", "description": "The skill level required to exploit the threat.", "enum": [ @@ -1200,7 +1180,6 @@ ], "properties": { "type": { - "type": "string", "title": "Type", "description": "The type of signature.", "enum": [ @@ -1230,7 +1209,6 @@ "description": "A description of what the signature detects." }, "confidence": { - "type": "string", "title": "Confidence", "description": "The confidence level of a detection by this signature.", "enum": [ @@ -1275,7 +1253,6 @@ "description": "A description of the trust boundary." }, "trustLevel": { - "type": "string", "title": "Trust Level", "description": "The trust level differential across the boundary.", "enum": [ @@ -1315,7 +1292,6 @@ } }, "killChainPhase": { - "type": "string", "title": "Kill Chain Phase", "description": "A phase of the cyber kill chain.", "enum": [ diff --git a/schema/2.0/model/cyclonedx-usecase-2.0.schema.json b/schema/2.0/model/cyclonedx-usecase-2.0.schema.json index 5d04372ff..003ef4ec1 100644 --- a/schema/2.0/model/cyclonedx-usecase-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-usecase-2.0.schema.json @@ -253,7 +253,6 @@ "description": "An identifier which can be used to reference the assertion elsewhere in the BOM. Every `bom-ref` must be unique within the BOM." }, "assertionType": { - "type": "string", "title": "Assertion Type", "description": "The type of assertion being made about the relationship between the component and the use case.", "enum": [ diff --git a/schema/2.0/model/cyclonedx-vulnerability-2.0.schema.json b/schema/2.0/model/cyclonedx-vulnerability-2.0.schema.json index 42204323f..551c2e0df 100644 --- a/schema/2.0/model/cyclonedx-vulnerability-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-vulnerability-2.0.schema.json @@ -220,7 +220,6 @@ "title": "Response", "description": "A response to the vulnerability by the manufacturer, supplier, or project responsible for the affected component or service. More than one response is allowed. Responses are strongly encouraged for vulnerabilities where the analysis state is exploitable.", "items": { - "type": "string", "enum": [ "can_not_fix", "will_not_fix", @@ -343,7 +342,6 @@ } }, "severity": { - "type": "string", "title": "Severity", "description": "Textual representation of the severity of the vulnerability adopted by the analysis method. If the analysis method uses values other than what is provided, the user is expected to translate appropriately.", "enum": [ @@ -366,7 +364,6 @@ } }, "scoreMethod": { - "type": "string", "title": "Method", "description": "Specifies the severity or risk scoring methodology or standard used.", "enum": [ @@ -389,7 +386,6 @@ } }, "impactAnalysisState": { - "type": "string", "title": "Impact Analysis State", "description": "Declares the current state of an occurrence of a vulnerability, after automated or manual analysis.", "enum": [ @@ -410,7 +406,6 @@ } }, "impactAnalysisJustification": { - "type": "string", "title": "Impact Analysis Justification", "description": "The rationale of why the impact analysis state was asserted.", "enum": [ @@ -500,7 +495,6 @@ }, "affectedStatus": { "description": "The vulnerability status of a given version or range of versions of a product. The statuses 'affected' and 'unaffected' indicate that the version is affected or unaffected by the vulnerability. The status 'unknown' indicates that it is unknown or unspecified whether the given version is affected. There can be many reasons for an 'unknown' status, including that an investigation has not been undertaken or that a vendor has not disclosed the status.", - "type": "string", "enum": [ "affected", "unaffected", @@ -675,7 +669,6 @@ ] }, "exploitabilityLevel": { - "type": "string", "title": "Exploitability", "description": "A graduated indication of how far analysis has substantiated that the vulnerability can be exploited in the affected subject, from mere presence of the component through confirmed exploitation. The value records the strongest level substantiated by the evidence. The levels indicate increasing confidence in exploitability rather than a strictly cumulative sequence, since reachability and precondition satisfiability are related but independent conditions. Mitigation of an otherwise exploitable condition is expressed through the vulnerability impact analysis justification, not through this field.", "enum": [ @@ -700,7 +693,6 @@ } }, "exploitMaturity": { - "type": "string", "title": "Exploit Maturity", "description": "The maturity of exploitation for the vulnerability in the broader threat landscape, independent of any particular affected subject. This complements the subject-specific exploitability and aligns with exploit-maturity metrics such as the CVSS Exploit Maturity metric and the SSVC Exploitation decision point. Ecosystem signals such as a CISA Known Exploited Vulnerabilities listing or an EPSS probability can be carried in `ratings` or `externalReferences`.", "enum": [ diff --git a/schema/behavior-taxonomy.schema.json b/schema/behavior-taxonomy.schema.json index 533b6d9f9..5d30638ab 100644 --- a/schema/behavior-taxonomy.schema.json +++ b/schema/behavior-taxonomy.schema.json @@ -1,7 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://cyclonedx.org/schema/behavior-taxonomy.schema.json", - "type": "string", "title": "CycloneDX Behavior Taxonomy", "description": "An independent taxonomy of behaviours that describe actions performed by entities with security, privacy, safety, or operational implications. This taxonomy is maintained separately from the CycloneDX specification and may evolve at a different rate.\n The taxonomy uses a hierarchical colon-delimited naming convention with three levels: domain (e.g. security), category (e.g. security:authentication), and specific behaviour (e.g. security:authentication:authenticatesUser).\n Values at any level of the hierarchy are valid.", "$comment" : "OWASP CycloneDX is an Ecma International standard (ECMA-424) developed in collaboration between the OWASP Foundation and Ecma Technical Committee 54 (TC54). The standard is published under a royalty-free patent policy. This JSON schema is the reference implementation and is licensed under the Apache License 2.0.", diff --git a/schema/cryptography-defs.schema.json b/schema/cryptography-defs.schema.json index c5ee0fee2..21a4ec9c6 100644 --- a/schema/cryptography-defs.schema.json +++ b/schema/cryptography-defs.schema.json @@ -176,7 +176,6 @@ "description": "The Object Identifier (OID) of the elliptic curve." }, "form": { - "type": "string", "title": "Form", "description": "The form of the elliptic curve.", "enum": [ @@ -238,7 +237,6 @@ ], "definitions": { "algorithmFamiliesEnum": { - "type": "string", "title": "Algorithm Families", "description": "An enum for the algorithm families.", "enum": [ @@ -338,7 +336,6 @@ ] }, "ellipticCurvesEnum": { - "type": "string", "enum": [ "anssi/FRP256v1", "bls/BLS12-377", diff --git a/schema/jsf-0.82.schema.json b/schema/jsf-0.82.schema.json index 3d8664790..0da34a16e 100644 --- a/schema/jsf-0.82.schema.json +++ b/schema/jsf-0.82.schema.json @@ -51,7 +51,6 @@ "algorithm": { "oneOf": [ { - "type": "string", "title": "Algorithm", "description": "Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of \"EdDSA\".", "enum": [ @@ -113,7 +112,6 @@ } }, "keyType": { - "type": "string", "title": "Key type", "description": "Key type indicator.", "enum": [ @@ -154,7 +152,6 @@ "$ref": "#/definitions/keyType" }, "crv": { - "type": "string", "title": "Curve name", "description": "EC curve name.", "enum": [ @@ -192,7 +189,6 @@ "$ref": "#/definitions/keyType" }, "crv": { - "type": "string", "title": "Curve name", "description": "EdDSA curve name.", "enum": [ diff --git a/schema/spdx.schema.json b/schema/spdx.schema.json index 2dccc87e3..d89c0b1e5 100644 --- a/schema/spdx.schema.json +++ b/schema/spdx.schema.json @@ -2,7 +2,6 @@ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://cyclonedx.org/schema/spdx.schema.json", "$comment": "v1.1-3.28.0", - "type": "string", "enum": [ "0BSD", "3D-Slicer-1.0", diff --git a/tools/src/main/java/org/cyclonedx/tools/SpdxXsdGenerator.java b/tools/src/main/java/org/cyclonedx/tools/SpdxXsdGenerator.java index 26fd6e3a5..eead5f60d 100644 --- a/tools/src/main/java/org/cyclonedx/tools/SpdxXsdGenerator.java +++ b/tools/src/main/java/org/cyclonedx/tools/SpdxXsdGenerator.java @@ -118,7 +118,6 @@ private void createJsonSchema(Map licenses, Map .append(indent(2)).append("\"$schema\": \"http://json-schema.org/draft-07/schema#\",").append("\n") .append(indent(2)).append("\"$id\": \"http://cyclonedx.org/schema/spdx.schema.json\",").append("\n") .append(indent(2)).append("\"$comment\": \"v1.1-" + StringEscapeUtils.escapeJson(stripLeadingV(tagName)) + "\",").append("\n") - .append(indent(2)).append("\"type\": \"string\",").append("\n") .append(indent(2)).append("\"enum\": ["); addLicenseAsJson(sb, licenses.entrySet()); diff --git a/tools/src/main/js/linter/README.md b/tools/src/main/js/linter/README.md index ebb8b8473..b0c1f7c1f 100644 --- a/tools/src/main/js/linter/README.md +++ b/tools/src/main/js/linter/README.md @@ -44,6 +44,7 @@ node cli.js schema.json | Check | Description | |-------|-------------| | `cdx2-reftype-usage` | CycloneDX-specific: `bom-ref` properties must `$ref` the shared `refType` definition; nothing else may reference `refType` (except `refLinkType`, which inherits from it) | +| `const-enum-no-type` | Objects declaring `const` or `enum` must not also declare `type`. | | `description-full-stop` | Descriptions must end with a full stop | | `description-oxford-english` | Descriptions must use Oxford English spelling (British with -ize) | | `duplicate-content` | Titles and descriptions must be unique within a schema | diff --git a/tools/src/main/js/linter/checks/const-enum-no-type.check.js b/tools/src/main/js/linter/checks/const-enum-no-type.check.js new file mode 100644 index 000000000..69c1469f6 --- /dev/null +++ b/tools/src/main/js/linter/checks/const-enum-no-type.check.js @@ -0,0 +1,63 @@ +/** + * CycloneDX Schema Linter - Const and Enum Without Type Check + * + * Reports objects that declare "type" alongside "const" or "enum". + * Presence is checked regardless of the keyword's value. + * + * The contents of "const" and "enum" are literal values, not schemas: + * their subtrees are skipped before inspection. + * + * @license Apache-2.0 + */ + +import { LintCheck, registerCheck, Severity, traverseSchema } from '../index.js'; + +const SKIP_KEYS = Object.freeze(new Set([ + 'const', 'enum', + 'default', +])) + +class ConstEnumNoTypeCheck extends LintCheck { + constructor() { + super( + 'const-enum-no-type', + 'Const and Enum Without Type', + 'Objects declaring "const" or "enum" must not also declare "type".', + Severity.ERROR + ); + } + + async run(schema) { + const issues = []; + + traverseSchema(schema, (node, path, key) => { + if (SKIP_KEYS.has(key)) { + // Prune literal values before inspecting them. + return false; + } + + if (node === null || typeof node !== 'object' || Array.isArray(node)) { + return; + } + + const hasOwn = keyword => + Object.prototype.hasOwnProperty.call(node, keyword); + + if ((hasOwn('const') || hasOwn('enum')) && hasOwn('type')) { + issues.push(this.createIssue( + 'An object declaring "const" or "enum" must not also declare "type".', + `${path}.type`, + { actual: node.type, expected: 'type omitted' } + )); + } + }); + + return issues; + } +} + +const check = new ConstEnumNoTypeCheck(); +registerCheck(check); + +export { ConstEnumNoTypeCheck }; +export default check; diff --git a/tools/src/main/js/linter/checks/index.js b/tools/src/main/js/linter/checks/index.js index 5e78cb01f..da0679312 100644 --- a/tools/src/main/js/linter/checks/index.js +++ b/tools/src/main/js/linter/checks/index.js @@ -36,6 +36,7 @@ export async function loadAllChecks() { // Export individual check modules for registration and direct access if needed export * from './cdx2-reftype-usage.check.js'; +export * from './const-enum-no-type.check.js'; export * from './description-full-stop.check.js'; export * from './description-oxford-english.check.js'; export * from './duplicate-content.check.js'; diff --git a/tools/src/main/python/algorithmFamilyGeneration.py b/tools/src/main/python/algorithmFamilyGeneration.py index 21b9f9c9f..5d31b0d3a 100755 --- a/tools/src/main/python/algorithmFamilyGeneration.py +++ b/tools/src/main/python/algorithmFamilyGeneration.py @@ -30,7 +30,6 @@ .isoformat().replace('+00:00', 'Z') schema_data['definitions']['algorithmFamiliesEnum'] = { - "type": "string", "title": "Algorithm Families", "description": "An enum for the algorithm families.", "enum": families,