diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 6df3dbc2..f7057357 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -269,7 +269,7 @@ There are a variety of build tasks which intersect with the meta schema:
### `meta_schema_types.yaml`
-[meta_schema_types.yaml](schema/meta_schema_types.yaml) contains property descriptions, semantics, and SDK extension plugin information.
+[meta_schema_types.yaml](schema/meta_schema_types.yaml) contains property descriptions, semantics, enum value descriptions, and SDK extension plugin information.
Content looks like:
@@ -281,6 +281,12 @@ Content looks like:
Configure max attribute value size.
Value must be non-negative.
If omitted or null, there is no limit.
+- type: OtlpHttpEncoding
+ enumValues:
+ - enumValue: json
+ description: Protobuf JSON encoding.
+ - enumValue: protobuf
+ description: Protobuf binary encoding.
# other types omitted for brevity
```
@@ -288,9 +294,12 @@ Notes:
* `[]` the document is an array of entries for each type in the JSON schema.
* `[].type` is the name of the JSON schema type. **Maintained automatically by build tooling.**
- * `[].properties` is an array of entries for each property in the JSON schema type.
+ * `[].properties` is an array of entries for each property in the JSON schema type. Omitted for enum types.
* `[].properties[].property` the name of the property. **Maintained automatically by build tooling.**
* `[].properties[].description` the property description, including semantics and default behavior.
+ * `[].enumValues` is an array of entries for each enum value in the JSON schema type. Omitted for non-enum types.
+ * `[].enumValues[].enumValue` the name of the enum value. **Maintained automatically by build tooling.**
+ * `[].enumValues[].description` the enum value description.
### `meta_schema_language_{language}.yaml`
@@ -316,9 +325,12 @@ Notes:
* `.typeSupportStatuses` is an array with entries for each type in the JSON schema.
* `.typeSupportStatuses[].type` is the name of the JSON schema type. **Maintained automatically by build tooling.**
* `.typeSupportStatuses[].status` captures the support status of the type and all properties except overrides in `.typeSupportStatuses[].propertyOverrides`. See enum options below.
- * `.typeSupportStatuses[].propertyOverrides` an array of properties which have different support statuses than the overall type as recorded in `.typeSupportStatuses[].status.
+ * `.typeSupportStatuses[].propertyOverrides` an array of properties which have different support statuses than the overall type as recorded in `.typeSupportStatuses[].status. Omitted for enum types.
* `.typeSupportStatuses[].propertyOverrides[].property` the name of the property whose support status is overridden.
* `.typeSupportStatuses[].propertyOverrides[].status` the overridden support status. See enum options below.
+ * `.typeSupportStatuses[].enumOverrides` an array of enum values which have different support statuses than the overall type as recorded in `.typeSupportStatuses[].status. Omitted for non-enum types.
+ * `.typeSupportStatuses[].enumOverrides[].enumValue` the name of the enum value whose support status is overridden.
+ * `.typeSupportStatuses[].enumOverrides[].status` the overridden support status. See enum options below.
* Status enum options, applicable to `.typeSupportStatuses[].status`, `.typeSupportStatuses[].propertyOverrides[].status`:
* `unknown`: Language maintainer has not yet recorded a status.
* `suppported`: The type / property is supported by the language implementation.
diff --git a/schema-docs.md b/schema-docs.md
index c42ccb54..866db58d 100644
--- a/schema-docs.md
+++ b/schema-docs.md
@@ -260,11 +260,35 @@ Usages:
## AttributeType
-No properties.
+This is a enum type.
-Constraints:
+| Value | Description |
+|---|---|
+| `bool` | TODO |
+| `bool_array` | TODO |
+| `double` | TODO |
+| `double_array` | TODO |
+| `int` | TODO |
+| `int_array` | TODO |
+| `string` | TODO |
+| `string_array` | TODO |
+
+
+Language support status
+
+| Value | [cpp](#cpp) | [go](#go) | [java](#java) | [js](#js) |
+|---|---|---|---|---|
+| `bool` | supported | unknown | supported | unknown |
+| `bool_array` | supported | unknown | supported | unknown |
+| `double` | supported | unknown | supported | unknown |
+| `double_array` | supported | unknown | supported | unknown |
+| `int` | supported | unknown | supported | unknown |
+| `int_array` | supported | unknown | supported | unknown |
+| `string` | supported | unknown | supported | unknown |
+| `string_array` | supported | unknown | supported | unknown |
+
-* `enum`: `[null,"string","bool","int","double","string_array","bool_array","int_array","double_array"]`
+No constraints.
Usages:
@@ -280,7 +304,6 @@ Usages:
"null"
],
"enum": [
- null,
"string",
"bool",
"int",
@@ -809,11 +832,25 @@ Usages:
## ExemplarFilter
-No properties.
+This is a enum type.
-Constraints:
+| Value | Description |
+|---|---|
+| `always_off` | TODO |
+| `always_on` | TODO |
+| `trace_based` | TODO |
+
+
+Language support status
-* `enum`: `["always_on","always_off","trace_based"]`
+| Value | [cpp](#cpp) | [go](#go) | [java](#java) | [js](#js) |
+|---|---|---|---|---|
+| `always_off` | not_implemented | unknown | supported | unknown |
+| `always_on` | not_implemented | unknown | supported | unknown |
+| `trace_based` | not_implemented | unknown | supported | unknown |
+
+
+No constraints.
Usages:
@@ -1885,7 +1922,7 @@ Usages:
| `port` | one of:
* `integer`
* `null`
| `false` | No constraints. | Configure port.
If omitted or null, 9464 is used.
|
| `without_scope_info` | one of:
* `boolean`
* `null`
| `false` | No constraints. | Configure Prometheus Exporter to produce metrics without a scope info metric.
If omitted or null, false is used.
|
| `with_resource_constant_labels` | [`IncludeExclude`](#includeexclude) | `false` | No constraints. | Configure Prometheus Exporter to add resource attributes as metrics attributes, where the resource attribute keys match the patterns. |
-| `translation_strategy` | one of:
* `string`
* `null`
| `false` | * `enum`: `["UnderscoreEscapingWithSuffixes","UnderscoreEscapingWithoutSuffixes","NoUTF8EscapingWithSuffixes","NoTranslation"]`
| Configure how Prometheus metrics are exposed. Values include:
* UnderscoreEscapingWithSuffixes, the default. This fully escapes metric names for classic Prometheus metric name compatibility, and includes appending type and unit suffixes.
* UnderscoreEscapingWithoutSuffixes, metric names will continue to escape special characters to _, but suffixes won't be attached.
* NoUTF8EscapingWithSuffixes will disable changing special characters to _. Special suffixes like units and _total for counters will be attached.
* NoTranslation. This strategy bypasses all metric and label name translation, passing them through unaltered.
If omitted or null, UnderscoreEscapingWithSuffixes is used.
|
+| `translation_strategy` | one of:
* `string`
* `null`
| `false` | No constraints. | Configure how Prometheus metrics are exposed. Values include:
* UnderscoreEscapingWithSuffixes, the default. This fully escapes metric names for classic Prometheus metric name compatibility, and includes appending type and unit suffixes.
* UnderscoreEscapingWithoutSuffixes, metric names will continue to escape special characters to _, but suffixes won't be attached.
* NoUTF8EscapingWithSuffixes will disable changing special characters to _. Special suffixes like units and _total for counters will be attached.
* NoTranslation. This strategy bypasses all metric and label name translation, passing them through unaltered.
If omitted or null, UnderscoreEscapingWithSuffixes is used.
|
Language support status
@@ -2294,11 +2331,23 @@ Usages:
## ExporterDefaultHistogramAggregation
-No properties.
+This is a enum type.
-Constraints:
+| Value | Description |
+|---|---|
+| `base2_exponential_bucket_histogram` | TODO |
+| `explicit_bucket_histogram` | TODO |
+
+
+Language support status
+
+| Value | [cpp](#cpp) | [go](#go) | [java](#java) | [js](#js) |
+|---|---|---|---|---|
+| `base2_exponential_bucket_histogram` | supported | unknown | supported | unknown |
+| `explicit_bucket_histogram` | supported | unknown | supported | unknown |
+
-* `enum`: `["explicit_bucket_histogram","base2_exponential_bucket_histogram"]`
+No constraints.
Usages:
@@ -2325,11 +2374,25 @@ Usages:
## ExporterTemporalityPreference
-No properties.
+This is a enum type.
-Constraints:
+| Value | Description |
+|---|---|
+| `cumulative` | TODO |
+| `delta` | TODO |
+| `low_memory` | TODO |
+
+
+Language support status
+
+| Value | [cpp](#cpp) | [go](#go) | [java](#java) | [js](#js) |
+|---|---|---|---|---|
+| `cumulative` | supported | unknown | supported | unknown |
+| `delta` | supported | unknown | supported | unknown |
+| `low_memory` | supported | unknown | supported | unknown |
+
-* `enum`: `["cumulative","delta","low_memory"]`
+No constraints.
Usages:
@@ -2535,11 +2598,33 @@ Usages:
## InstrumentType
-No properties.
+This is a enum type.
-Constraints:
+| Value | Description |
+|---|---|
+| `counter` | TODO |
+| `gauge` | TODO |
+| `histogram` | TODO |
+| `observable_counter` | TODO |
+| `observable_gauge` | TODO |
+| `observable_up_down_counter` | TODO |
+| `up_down_counter` | TODO |
+
+
+Language support status
-* `enum`: `["counter","gauge","histogram","observable_counter","observable_gauge","observable_up_down_counter","up_down_counter"]`
+| Value | [cpp](#cpp) | [go](#go) | [java](#java) | [js](#js) |
+|---|---|---|---|---|
+| `counter` | supported | unknown | supported | unknown |
+| `gauge` | supported | unknown | supported | unknown |
+| `histogram` | supported | unknown | supported | unknown |
+| `observable_counter` | supported | unknown | supported | unknown |
+| `observable_gauge` | supported | unknown | supported | unknown |
+| `observable_up_down_counter` | supported | unknown | supported | unknown |
+| `up_down_counter` | supported | unknown | supported | unknown |
+
+
+No constraints.
Usages:
@@ -4284,11 +4369,23 @@ Usages:
## OtlpHttpEncoding
-No properties.
+This is a enum type.
-Constraints:
+| Value | Description |
+|---|---|
+| `json` | Protobuf JSON encoding. |
+| `protobuf` | Protobuf binary encoding. |
-* `enum`: `["protobuf","json"]`
+
+Language support status
+
+| Value | [cpp](#cpp) | [go](#go) | [java](#java) | [js](#js) |
+|---|---|---|---|---|
+| `json` | supported | unknown | not_implemented | unknown |
+| `protobuf` | supported | unknown | supported | unknown |
+
+
+No constraints.
Usages:
@@ -5034,7 +5131,6 @@ Usages:
"null"
],
"enum": [
- null,
"string",
"bool",
"int",
@@ -6305,14 +6401,14 @@ Usages:
Latest supported file format: `1.0.0-rc.2`
-| Type | Status | Notes | Property Support Status |
+| Type | Status | Notes | Support Status Details |
|---|---|---|---|
| [`Aggregation`](#aggregation) | supported | | * `default`: supported
* `drop`: supported
* `explicit_bucket_histogram`: supported
* `base2_exponential_bucket_histogram`: supported
* `last_value`: supported
* `sum`: supported
|
| [`AlwaysOffSampler`](#alwaysoffsampler) | supported | | |
| [`AlwaysOnSampler`](#alwaysonsampler) | supported | | |
| [`AttributeLimits`](#attributelimits) | supported | | * `attribute_value_length_limit`: supported
* `attribute_count_limit`: supported
|
| [`AttributeNameValue`](#attributenamevalue) | supported | | * `name`: supported
* `value`: supported
* `type`: supported
|
-| [`AttributeType`](#attributetype) | supported | | |
+| [`AttributeType`](#attributetype) | supported | | * `bool`: supported
* `bool_array`: supported
* `double`: supported
* `double_array`: supported
* `int`: supported
* `int_array`: supported
* `string`: supported
* `string_array`: supported
|
| [`B3MultiPropagator`](#b3multipropagator) | supported | | |
| [`B3Propagator`](#b3propagator) | supported | | |
| [`BaggagePropagator`](#baggagepropagator) | supported | | |
@@ -6324,7 +6420,7 @@ Latest supported file format: `1.0.0-rc.2`
| [`ConsoleMetricExporter`](#consolemetricexporter) | supported | | * `temporality_preference`: supported
* `default_histogram_aggregation`: supported
|
| [`DefaultAggregation`](#defaultaggregation) | supported | | |
| [`DropAggregation`](#dropaggregation) | supported | | |
-| [`ExemplarFilter`](#exemplarfilter) | not_implemented | | |
+| [`ExemplarFilter`](#exemplarfilter) | not_implemented | | * `always_off`: not_implemented
* `always_on`: not_implemented
* `trace_based`: not_implemented
|
| [`ExperimentalContainerResourceDetector`](#experimentalcontainerresourcedetector) | not_implemented | | |
| [`ExperimentalGeneralInstrumentation`](#experimentalgeneralinstrumentation) | not_applicable | | * `peer`: not_applicable
* `http`: not_applicable
|
| [`ExperimentalHostResourceDetector`](#experimentalhostresourcedetector) | not_implemented | | |
@@ -6353,12 +6449,12 @@ Latest supported file format: `1.0.0-rc.2`
| [`ExperimentalTracerConfigurator`](#experimentaltracerconfigurator) | not_implemented | | * `default_config`: not_implemented
* `tracers`: not_implemented
|
| [`ExperimentalTracerMatcherAndConfig`](#experimentaltracermatcherandconfig) | not_implemented | | * `name`: not_implemented
* `config`: not_implemented
|
| [`ExplicitBucketHistogramAggregation`](#explicitbuckethistogramaggregation) | supported | | * `boundaries`: supported
* `record_min_max`: supported
|
-| [`ExporterDefaultHistogramAggregation`](#exporterdefaulthistogramaggregation) | supported | | |
-| [`ExporterTemporalityPreference`](#exportertemporalitypreference) | supported | | |
+| [`ExporterDefaultHistogramAggregation`](#exporterdefaulthistogramaggregation) | supported | | * `base2_exponential_bucket_histogram`: supported
* `explicit_bucket_histogram`: supported
|
+| [`ExporterTemporalityPreference`](#exportertemporalitypreference) | supported | | * `cumulative`: supported
* `delta`: supported
* `low_memory`: supported
|
| [`GrpcTls`](#grpctls) | unknown | | * `certificate_file`: unknown
* `client_key_file`: unknown
* `client_certificate_file`: unknown
* `insecure`: unknown
|
| [`HttpTls`](#httptls) | unknown | | * `certificate_file`: unknown
* `client_key_file`: unknown
* `client_certificate_file`: unknown
|
| [`IncludeExclude`](#includeexclude) | supported | | * `included`: supported
* `excluded`: supported
|
-| [`InstrumentType`](#instrumenttype) | supported | | |
+| [`InstrumentType`](#instrumenttype) | supported | | * `counter`: supported
* `gauge`: supported
* `histogram`: supported
* `observable_counter`: supported
* `observable_gauge`: supported
* `observable_up_down_counter`: supported
* `up_down_counter`: supported
|
| [`JaegerPropagator`](#jaegerpropagator) | supported | | |
| [`JaegerRemoteSampler`](#jaegerremotesampler) | not_implemented | | * `endpoint`: not_implemented
* `interval`: not_implemented
* `initial_sampler`: not_implemented
|
| [`LastValueAggregation`](#lastvalueaggregation) | supported | | |
@@ -6375,7 +6471,7 @@ Latest supported file format: `1.0.0-rc.2`
| [`OpenTracingPropagator`](#opentracingpropagator) | not_implemented | | |
| [`OtlpGrpcExporter`](#otlpgrpcexporter) | supported | | * `endpoint`: supported
* `headers`: supported
* `headers_list`: supported
* `compression`: supported
* `timeout`: supported
* `tls`: supported
|
| [`OtlpGrpcMetricExporter`](#otlpgrpcmetricexporter) | supported | | * `endpoint`: supported
* `headers`: supported
* `headers_list`: supported
* `compression`: supported
* `timeout`: supported
* `temporality_preference`: supported
* `default_histogram_aggregation`: supported
* `tls`: supported
|
-| [`OtlpHttpEncoding`](#otlphttpencoding) | supported | | |
+| [`OtlpHttpEncoding`](#otlphttpencoding) | supported | | * `json`: supported
* `protobuf`: supported
|
| [`OtlpHttpExporter`](#otlphttpexporter) | supported | | * `endpoint`: supported
* `headers`: supported
* `headers_list`: supported
* `compression`: supported
* `timeout`: supported
* `encoding`: supported
* `tls`: supported
|
| [`OtlpHttpMetricExporter`](#otlphttpmetricexporter) | supported | | * `endpoint`: supported
* `endpoint`: supported
* `headers`: supported
* `headers_list`: supported
* `compression`: supported
* `timeout`: supported
* `encoding`: supported
* `temporality_preference`: supported
* `default_histogram_aggregation`: supported
* `tls`: supported
|
| [`ParentBasedSampler`](#parentbasedsampler) | supported | | * `root`: supported
* `remote_parent_sampled`: supported
* `remote_parent_not_sampled`: supported
* `local_parent_sampled`: supported
* `local_parent_not_sampled`: supported
|
@@ -6406,14 +6502,14 @@ Latest supported file format: `1.0.0-rc.2`
Latest supported file format: `0.3.0`
-| Type | Status | Notes | Property Support Status |
+| Type | Status | Notes | Support Status Details |
|---|---|---|---|
| [`Aggregation`](#aggregation) | unknown | | * `default`: unknown
* `drop`: unknown
* `explicit_bucket_histogram`: unknown
* `base2_exponential_bucket_histogram`: unknown
* `last_value`: unknown
* `sum`: unknown
|
| [`AlwaysOffSampler`](#alwaysoffsampler) | unknown | | |
| [`AlwaysOnSampler`](#alwaysonsampler) | unknown | | |
| [`AttributeLimits`](#attributelimits) | unknown | | * `attribute_value_length_limit`: unknown
* `attribute_count_limit`: unknown
|
| [`AttributeNameValue`](#attributenamevalue) | unknown | | * `name`: unknown
* `value`: unknown
* `type`: unknown
|
-| [`AttributeType`](#attributetype) | unknown | | |
+| [`AttributeType`](#attributetype) | unknown | | * `bool`: unknown
* `bool_array`: unknown
* `double`: unknown
* `double_array`: unknown
* `int`: unknown
* `int_array`: unknown
* `string`: unknown
* `string_array`: unknown
|
| [`B3MultiPropagator`](#b3multipropagator) | unknown | | |
| [`B3Propagator`](#b3propagator) | unknown | | |
| [`BaggagePropagator`](#baggagepropagator) | unknown | | |
@@ -6425,7 +6521,7 @@ Latest supported file format: `0.3.0`
| [`ConsoleMetricExporter`](#consolemetricexporter) | unknown | | * `temporality_preference`: unknown
* `default_histogram_aggregation`: unknown
|
| [`DefaultAggregation`](#defaultaggregation) | unknown | | |
| [`DropAggregation`](#dropaggregation) | unknown | | |
-| [`ExemplarFilter`](#exemplarfilter) | unknown | | |
+| [`ExemplarFilter`](#exemplarfilter) | unknown | | * `always_off`: unknown
* `always_on`: unknown
* `trace_based`: unknown
|
| [`ExperimentalContainerResourceDetector`](#experimentalcontainerresourcedetector) | unknown | | |
| [`ExperimentalGeneralInstrumentation`](#experimentalgeneralinstrumentation) | unknown | | * `peer`: unknown
* `http`: unknown
|
| [`ExperimentalHostResourceDetector`](#experimentalhostresourcedetector) | unknown | | |
@@ -6454,12 +6550,12 @@ Latest supported file format: `0.3.0`
| [`ExperimentalTracerConfigurator`](#experimentaltracerconfigurator) | unknown | | * `default_config`: unknown
* `tracers`: unknown
|
| [`ExperimentalTracerMatcherAndConfig`](#experimentaltracermatcherandconfig) | unknown | | * `name`: unknown
* `config`: unknown
|
| [`ExplicitBucketHistogramAggregation`](#explicitbuckethistogramaggregation) | unknown | | * `boundaries`: unknown
* `record_min_max`: unknown
|
-| [`ExporterDefaultHistogramAggregation`](#exporterdefaulthistogramaggregation) | unknown | | |
-| [`ExporterTemporalityPreference`](#exportertemporalitypreference) | unknown | | |
+| [`ExporterDefaultHistogramAggregation`](#exporterdefaulthistogramaggregation) | unknown | | * `base2_exponential_bucket_histogram`: unknown
* `explicit_bucket_histogram`: unknown
|
+| [`ExporterTemporalityPreference`](#exportertemporalitypreference) | unknown | | * `cumulative`: unknown
* `delta`: unknown
* `low_memory`: unknown
|
| [`GrpcTls`](#grpctls) | unknown | | * `certificate_file`: unknown
* `client_key_file`: unknown
* `client_certificate_file`: unknown
* `insecure`: unknown
|
| [`HttpTls`](#httptls) | unknown | | * `certificate_file`: unknown
* `client_key_file`: unknown
* `client_certificate_file`: unknown
|
| [`IncludeExclude`](#includeexclude) | unknown | | * `included`: unknown
* `excluded`: unknown
|
-| [`InstrumentType`](#instrumenttype) | unknown | | |
+| [`InstrumentType`](#instrumenttype) | unknown | | * `counter`: unknown
* `gauge`: unknown
* `histogram`: unknown
* `observable_counter`: unknown
* `observable_gauge`: unknown
* `observable_up_down_counter`: unknown
* `up_down_counter`: unknown
|
| [`JaegerPropagator`](#jaegerpropagator) | unknown | | |
| [`JaegerRemoteSampler`](#jaegerremotesampler) | unknown | | * `endpoint`: unknown
* `interval`: unknown
* `initial_sampler`: unknown
|
| [`LastValueAggregation`](#lastvalueaggregation) | unknown | | |
@@ -6476,7 +6572,7 @@ Latest supported file format: `0.3.0`
| [`OpenTracingPropagator`](#opentracingpropagator) | unknown | | |
| [`OtlpGrpcExporter`](#otlpgrpcexporter) | unknown | | * `endpoint`: unknown
* `headers`: unknown
* `headers_list`: unknown
* `compression`: unknown
* `timeout`: unknown
* `tls`: unknown
|
| [`OtlpGrpcMetricExporter`](#otlpgrpcmetricexporter) | unknown | | * `endpoint`: unknown
* `headers`: unknown
* `headers_list`: unknown
* `compression`: unknown
* `timeout`: unknown
* `temporality_preference`: unknown
* `default_histogram_aggregation`: unknown
* `tls`: unknown
|
-| [`OtlpHttpEncoding`](#otlphttpencoding) | unknown | | |
+| [`OtlpHttpEncoding`](#otlphttpencoding) | unknown | | * `json`: unknown
* `protobuf`: unknown
|
| [`OtlpHttpExporter`](#otlphttpexporter) | unknown | | * `endpoint`: unknown
* `headers`: unknown
* `headers_list`: unknown
* `compression`: unknown
* `timeout`: unknown
* `encoding`: unknown
* `tls`: unknown
|
| [`OtlpHttpMetricExporter`](#otlphttpmetricexporter) | unknown | | * `endpoint`: unknown
* `endpoint`: unknown
* `headers`: unknown
* `headers_list`: unknown
* `compression`: unknown
* `timeout`: unknown
* `encoding`: unknown
* `temporality_preference`: unknown
* `default_histogram_aggregation`: unknown
* `tls`: unknown
|
| [`ParentBasedSampler`](#parentbasedsampler) | unknown | | * `root`: unknown
* `remote_parent_sampled`: unknown
* `remote_parent_not_sampled`: unknown
* `local_parent_sampled`: unknown
* `local_parent_not_sampled`: unknown
|
@@ -6507,14 +6603,14 @@ Latest supported file format: `0.3.0`
Latest supported file format: `1.0.0-rc.1`
-| Type | Status | Notes | Property Support Status |
+| Type | Status | Notes | Support Status Details |
|---|---|---|---|
| [`Aggregation`](#aggregation) | supported | | * `default`: supported
* `drop`: supported
* `explicit_bucket_histogram`: supported
* `base2_exponential_bucket_histogram`: supported
* `last_value`: supported
* `sum`: supported
|
| [`AlwaysOffSampler`](#alwaysoffsampler) | supported | | |
| [`AlwaysOnSampler`](#alwaysonsampler) | supported | | |
| [`AttributeLimits`](#attributelimits) | supported | | * `attribute_value_length_limit`: supported
* `attribute_count_limit`: supported
|
| [`AttributeNameValue`](#attributenamevalue) | supported | | * `name`: supported
* `value`: supported
* `type`: supported
|
-| [`AttributeType`](#attributetype) | supported | | |
+| [`AttributeType`](#attributetype) | supported | | * `bool`: supported
* `bool_array`: supported
* `double`: supported
* `double_array`: supported
* `int`: supported
* `int_array`: supported
* `string`: supported
* `string_array`: supported
|
| [`B3MultiPropagator`](#b3multipropagator) | supported | | |
| [`B3Propagator`](#b3propagator) | supported | | |
| [`BaggagePropagator`](#baggagepropagator) | supported | | |
@@ -6526,7 +6622,7 @@ Latest supported file format: `1.0.0-rc.1`
| [`ConsoleMetricExporter`](#consolemetricexporter) | unknown | | * `temporality_preference`: unknown
* `default_histogram_aggregation`: unknown
|
| [`DefaultAggregation`](#defaultaggregation) | supported | | |
| [`DropAggregation`](#dropaggregation) | supported | | |
-| [`ExemplarFilter`](#exemplarfilter) | supported | | |
+| [`ExemplarFilter`](#exemplarfilter) | supported | | * `always_off`: supported
* `always_on`: supported
* `trace_based`: supported
|
| [`ExperimentalContainerResourceDetector`](#experimentalcontainerresourcedetector) | supported | | |
| [`ExperimentalGeneralInstrumentation`](#experimentalgeneralinstrumentation) | supported | | * `peer`: supported
* `http`: supported
|
| [`ExperimentalHostResourceDetector`](#experimentalhostresourcedetector) | supported | | |
@@ -6555,12 +6651,12 @@ Latest supported file format: `1.0.0-rc.1`
| [`ExperimentalTracerConfigurator`](#experimentaltracerconfigurator) | supported | | * `default_config`: supported
* `tracers`: supported
|
| [`ExperimentalTracerMatcherAndConfig`](#experimentaltracermatcherandconfig) | supported | | * `name`: supported
* `config`: supported
|
| [`ExplicitBucketHistogramAggregation`](#explicitbuckethistogramaggregation) | supported | | * `boundaries`: supported
* `record_min_max`: supported
|
-| [`ExporterDefaultHistogramAggregation`](#exporterdefaulthistogramaggregation) | supported | | |
-| [`ExporterTemporalityPreference`](#exportertemporalitypreference) | supported | | |
+| [`ExporterDefaultHistogramAggregation`](#exporterdefaulthistogramaggregation) | supported | | * `base2_exponential_bucket_histogram`: supported
* `explicit_bucket_histogram`: supported
|
+| [`ExporterTemporalityPreference`](#exportertemporalitypreference) | supported | | * `cumulative`: supported
* `delta`: supported
* `low_memory`: supported
|
| [`GrpcTls`](#grpctls) | unknown | | * `certificate_file`: unknown
* `client_key_file`: unknown
* `client_certificate_file`: unknown
* `insecure`: not_applicable
|
| [`HttpTls`](#httptls) | unknown | | * `certificate_file`: unknown
* `client_key_file`: unknown
* `client_certificate_file`: unknown
|
| [`IncludeExclude`](#includeexclude) | supported | | * `included`: supported
* `excluded`: supported
|
-| [`InstrumentType`](#instrumenttype) | supported | | |
+| [`InstrumentType`](#instrumenttype) | supported | | * `counter`: supported
* `gauge`: supported
* `histogram`: supported
* `observable_counter`: supported
* `observable_gauge`: supported
* `observable_up_down_counter`: supported
* `up_down_counter`: supported
|
| [`JaegerPropagator`](#jaegerpropagator) | supported | | |
| [`JaegerRemoteSampler`](#jaegerremotesampler) | supported | | * `endpoint`: supported
* `interval`: supported
* `initial_sampler`: supported
|
| [`LastValueAggregation`](#lastvalueaggregation) | supported | | |
@@ -6577,7 +6673,7 @@ Latest supported file format: `1.0.0-rc.1`
| [`OpenTracingPropagator`](#opentracingpropagator) | supported | | |
| [`OtlpGrpcExporter`](#otlpgrpcexporter) | supported | | * `endpoint`: supported
* `headers`: supported
* `headers_list`: supported
* `compression`: supported
* `timeout`: supported
* `tls`: supported
|
| [`OtlpGrpcMetricExporter`](#otlpgrpcmetricexporter) | supported | | * `endpoint`: supported
* `headers`: supported
* `headers_list`: supported
* `compression`: supported
* `timeout`: supported
* `temporality_preference`: supported
* `default_histogram_aggregation`: supported
* `tls`: supported
|
-| [`OtlpHttpEncoding`](#otlphttpencoding) | supported | | |
+| [`OtlpHttpEncoding`](#otlphttpencoding) | supported | | * `json`: not_implemented
* `protobuf`: supported
|
| [`OtlpHttpExporter`](#otlphttpexporter) | supported | | * `endpoint`: supported
* `headers`: supported
* `headers_list`: supported
* `compression`: supported
* `timeout`: supported
* `encoding`: supported
* `tls`: supported
|
| [`OtlpHttpMetricExporter`](#otlphttpmetricexporter) | supported | | * `endpoint`: supported
* `endpoint`: supported
* `headers`: supported
* `headers_list`: supported
* `compression`: supported
* `timeout`: supported
* `encoding`: supported
* `temporality_preference`: supported
* `default_histogram_aggregation`: supported
* `tls`: supported
|
| [`ParentBasedSampler`](#parentbasedsampler) | supported | | * `root`: supported
* `remote_parent_sampled`: supported
* `remote_parent_not_sampled`: supported
* `local_parent_sampled`: supported
* `local_parent_not_sampled`: supported
|
@@ -6608,14 +6704,14 @@ Latest supported file format: `1.0.0-rc.1`
Latest supported file format: `1.0.0-rc.2`
-| Type | Status | Notes | Property Support Status |
+| Type | Status | Notes | Support Status Details |
|---|---|---|---|
| [`Aggregation`](#aggregation) | unknown | | * `default`: unknown
* `drop`: unknown
* `explicit_bucket_histogram`: unknown
* `base2_exponential_bucket_histogram`: unknown
* `last_value`: unknown
* `sum`: unknown
|
| [`AlwaysOffSampler`](#alwaysoffsampler) | unknown | | |
| [`AlwaysOnSampler`](#alwaysonsampler) | unknown | | |
| [`AttributeLimits`](#attributelimits) | unknown | | * `attribute_value_length_limit`: unknown
* `attribute_count_limit`: unknown
|
| [`AttributeNameValue`](#attributenamevalue) | unknown | | * `name`: unknown
* `value`: unknown
* `type`: unknown
|
-| [`AttributeType`](#attributetype) | unknown | | |
+| [`AttributeType`](#attributetype) | unknown | | * `bool`: unknown
* `bool_array`: unknown
* `double`: unknown
* `double_array`: unknown
* `int`: unknown
* `int_array`: unknown
* `string`: unknown
* `string_array`: unknown
|
| [`B3MultiPropagator`](#b3multipropagator) | unknown | | |
| [`B3Propagator`](#b3propagator) | unknown | | |
| [`BaggagePropagator`](#baggagepropagator) | unknown | | |
@@ -6627,7 +6723,7 @@ Latest supported file format: `1.0.0-rc.2`
| [`ConsoleMetricExporter`](#consolemetricexporter) | unknown | | * `temporality_preference`: unknown
* `default_histogram_aggregation`: unknown
|
| [`DefaultAggregation`](#defaultaggregation) | unknown | | |
| [`DropAggregation`](#dropaggregation) | unknown | | |
-| [`ExemplarFilter`](#exemplarfilter) | unknown | | |
+| [`ExemplarFilter`](#exemplarfilter) | unknown | | * `always_off`: unknown
* `always_on`: unknown
* `trace_based`: unknown
|
| [`ExperimentalContainerResourceDetector`](#experimentalcontainerresourcedetector) | unknown | | |
| [`ExperimentalGeneralInstrumentation`](#experimentalgeneralinstrumentation) | unknown | | * `peer`: unknown
* `http`: unknown
|
| [`ExperimentalHostResourceDetector`](#experimentalhostresourcedetector) | unknown | | |
@@ -6656,12 +6752,12 @@ Latest supported file format: `1.0.0-rc.2`
| [`ExperimentalTracerConfigurator`](#experimentaltracerconfigurator) | unknown | | * `default_config`: unknown
* `tracers`: unknown
|
| [`ExperimentalTracerMatcherAndConfig`](#experimentaltracermatcherandconfig) | unknown | | * `name`: unknown
* `config`: unknown
|
| [`ExplicitBucketHistogramAggregation`](#explicitbuckethistogramaggregation) | unknown | | * `boundaries`: unknown
* `record_min_max`: unknown
|
-| [`ExporterDefaultHistogramAggregation`](#exporterdefaulthistogramaggregation) | unknown | | |
-| [`ExporterTemporalityPreference`](#exportertemporalitypreference) | unknown | | |
+| [`ExporterDefaultHistogramAggregation`](#exporterdefaulthistogramaggregation) | unknown | | * `base2_exponential_bucket_histogram`: unknown
* `explicit_bucket_histogram`: unknown
|
+| [`ExporterTemporalityPreference`](#exportertemporalitypreference) | unknown | | * `cumulative`: unknown
* `delta`: unknown
* `low_memory`: unknown
|
| [`GrpcTls`](#grpctls) | unknown | | * `certificate_file`: unknown
* `client_key_file`: unknown
* `client_certificate_file`: unknown
* `insecure`: unknown
|
| [`HttpTls`](#httptls) | unknown | | * `certificate_file`: unknown
* `client_key_file`: unknown
* `client_certificate_file`: unknown
|
| [`IncludeExclude`](#includeexclude) | unknown | | * `included`: unknown
* `excluded`: unknown
|
-| [`InstrumentType`](#instrumenttype) | unknown | | |
+| [`InstrumentType`](#instrumenttype) | unknown | | * `counter`: unknown
* `gauge`: unknown
* `histogram`: unknown
* `observable_counter`: unknown
* `observable_gauge`: unknown
* `observable_up_down_counter`: unknown
* `up_down_counter`: unknown
|
| [`JaegerPropagator`](#jaegerpropagator) | unknown | | |
| [`JaegerRemoteSampler`](#jaegerremotesampler) | unknown | | * `endpoint`: unknown
* `interval`: unknown
* `initial_sampler`: unknown
|
| [`LastValueAggregation`](#lastvalueaggregation) | unknown | | |
@@ -6678,7 +6774,7 @@ Latest supported file format: `1.0.0-rc.2`
| [`OpenTracingPropagator`](#opentracingpropagator) | unknown | | |
| [`OtlpGrpcExporter`](#otlpgrpcexporter) | unknown | | * `endpoint`: unknown
* `headers`: unknown
* `headers_list`: unknown
* `compression`: unknown
* `timeout`: unknown
* `tls`: unknown
|
| [`OtlpGrpcMetricExporter`](#otlpgrpcmetricexporter) | unknown | | * `endpoint`: unknown
* `headers`: unknown
* `headers_list`: unknown
* `compression`: unknown
* `timeout`: unknown
* `temporality_preference`: unknown
* `default_histogram_aggregation`: unknown
* `tls`: unknown
|
-| [`OtlpHttpEncoding`](#otlphttpencoding) | unknown | | |
+| [`OtlpHttpEncoding`](#otlphttpencoding) | unknown | | * `json`: unknown
* `protobuf`: unknown
|
| [`OtlpHttpExporter`](#otlphttpexporter) | unknown | | * `endpoint`: unknown
* `headers`: unknown
* `headers_list`: unknown
* `compression`: unknown
* `timeout`: unknown
* `encoding`: unknown
* `tls`: unknown
|
| [`OtlpHttpMetricExporter`](#otlphttpmetricexporter) | unknown | | * `endpoint`: unknown
* `endpoint`: unknown
* `headers`: unknown
* `headers_list`: unknown
* `compression`: unknown
* `timeout`: unknown
* `encoding`: unknown
* `temporality_preference`: unknown
* `default_histogram_aggregation`: unknown
* `tls`: unknown
|
| [`ParentBasedSampler`](#parentbasedsampler) | unknown | | * `root`: unknown
* `remote_parent_sampled`: unknown
* `remote_parent_not_sampled`: unknown
* `local_parent_sampled`: unknown
* `local_parent_not_sampled`: unknown
|
diff --git a/schema/meta_schema_language_cpp.yaml b/schema/meta_schema_language_cpp.yaml
index 46abd9a2..66dc3dc0 100644
--- a/schema/meta_schema_language_cpp.yaml
+++ b/schema/meta_schema_language_cpp.yaml
@@ -23,7 +23,7 @@ typeSupportStatuses:
- type: AttributeType
status: supported
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: B3MultiPropagator
status: supported
notes: ""
@@ -71,7 +71,7 @@ typeSupportStatuses:
- type: ExemplarFilter
status: not_implemented
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: ExperimentalContainerResourceDetector
status: not_implemented
notes: ""
@@ -187,11 +187,11 @@ typeSupportStatuses:
- type: ExporterDefaultHistogramAggregation
status: supported
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: ExporterTemporalityPreference
status: supported
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: GrpcTls
status: unknown
notes: ""
@@ -207,7 +207,7 @@ typeSupportStatuses:
- type: InstrumentType
status: supported
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: JaegerPropagator
status: supported
notes: ""
@@ -275,7 +275,7 @@ typeSupportStatuses:
- type: OtlpHttpEncoding
status: supported
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: OtlpHttpExporter
status: supported
notes: ""
diff --git a/schema/meta_schema_language_go.yaml b/schema/meta_schema_language_go.yaml
index ef4a65e8..3d0e745c 100644
--- a/schema/meta_schema_language_go.yaml
+++ b/schema/meta_schema_language_go.yaml
@@ -23,7 +23,7 @@ typeSupportStatuses:
- type: AttributeType
status: unknown
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: B3MultiPropagator
status: unknown
notes: ""
@@ -71,7 +71,7 @@ typeSupportStatuses:
- type: ExemplarFilter
status: unknown
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: ExperimentalContainerResourceDetector
status: unknown
notes: ""
@@ -187,11 +187,11 @@ typeSupportStatuses:
- type: ExporterDefaultHistogramAggregation
status: unknown
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: ExporterTemporalityPreference
status: unknown
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: GrpcTls
status: unknown
notes: ""
@@ -207,7 +207,7 @@ typeSupportStatuses:
- type: InstrumentType
status: unknown
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: JaegerPropagator
status: unknown
notes: ""
@@ -275,7 +275,7 @@ typeSupportStatuses:
- type: OtlpHttpEncoding
status: unknown
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: OtlpHttpExporter
status: unknown
notes: ""
diff --git a/schema/meta_schema_language_java.yaml b/schema/meta_schema_language_java.yaml
index 8a7e6c82..598fffb7 100644
--- a/schema/meta_schema_language_java.yaml
+++ b/schema/meta_schema_language_java.yaml
@@ -23,7 +23,7 @@ typeSupportStatuses:
- type: AttributeType
status: supported
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: B3MultiPropagator
status: supported
notes: ""
@@ -73,7 +73,7 @@ typeSupportStatuses:
- type: ExemplarFilter
status: supported
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: ExperimentalContainerResourceDetector
status: supported
notes: ""
@@ -193,11 +193,11 @@ typeSupportStatuses:
- type: ExporterDefaultHistogramAggregation
status: supported
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: ExporterTemporalityPreference
status: supported
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: GrpcTls
status: unknown
notes: ""
@@ -215,7 +215,7 @@ typeSupportStatuses:
- type: InstrumentType
status: supported
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: JaegerPropagator
status: supported
notes: ""
@@ -283,7 +283,9 @@ typeSupportStatuses:
- type: OtlpHttpEncoding
status: supported
notes: ""
- propertyOverrides: []
+ enumOverrides:
+ - enumValue: json
+ status: not_implemented
- type: OtlpHttpExporter
status: supported
notes: ""
diff --git a/schema/meta_schema_language_js.yaml b/schema/meta_schema_language_js.yaml
index 84b94017..0d7c3c63 100644
--- a/schema/meta_schema_language_js.yaml
+++ b/schema/meta_schema_language_js.yaml
@@ -23,7 +23,7 @@ typeSupportStatuses:
- type: AttributeType
status: unknown
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: B3MultiPropagator
status: unknown
notes: ""
@@ -71,7 +71,7 @@ typeSupportStatuses:
- type: ExemplarFilter
status: unknown
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: ExperimentalContainerResourceDetector
status: unknown
notes: ""
@@ -187,11 +187,11 @@ typeSupportStatuses:
- type: ExporterDefaultHistogramAggregation
status: unknown
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: ExporterTemporalityPreference
status: unknown
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: GrpcTls
status: unknown
notes: ""
@@ -207,7 +207,7 @@ typeSupportStatuses:
- type: InstrumentType
status: unknown
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: JaegerPropagator
status: unknown
notes: ""
@@ -275,7 +275,7 @@ typeSupportStatuses:
- type: OtlpHttpEncoding
status: unknown
notes: ""
- propertyOverrides: []
+ enumOverrides: []
- type: OtlpHttpExporter
status: unknown
notes: ""
diff --git a/schema/meta_schema_types.yaml b/schema/meta_schema_types.yaml
index 3ab29612..1192e954 100644
--- a/schema/meta_schema_types.yaml
+++ b/schema/meta_schema_types.yaml
@@ -48,7 +48,23 @@
If omitted or null, string is used.
isSdkExtensionPlugin: false
- type: AttributeType
- properties: []
+ enumValues:
+ - enumValue: bool
+ description: TODO
+ - enumValue: bool_array
+ description: TODO
+ - enumValue: double
+ description: TODO
+ - enumValue: double_array
+ description: TODO
+ - enumValue: int
+ description: TODO
+ - enumValue: int_array
+ description: TODO
+ - enumValue: string
+ description: TODO
+ - enumValue: string_array
+ description: TODO
isSdkExtensionPlugin: false
- type: B3MultiPropagator
properties: []
@@ -160,7 +176,13 @@
properties: []
isSdkExtensionPlugin: false
- type: ExemplarFilter
- properties: []
+ enumValues:
+ - enumValue: always_off
+ description: TODO
+ - enumValue: always_on
+ description: TODO
+ - enumValue: trace_based
+ description: TODO
isSdkExtensionPlugin: false
- type: ExperimentalContainerResourceDetector
properties: []
@@ -444,10 +466,20 @@
If omitted or null, true is used.
isSdkExtensionPlugin: false
- type: ExporterDefaultHistogramAggregation
- properties: []
+ enumValues:
+ - enumValue: base2_exponential_bucket_histogram
+ description: TODO
+ - enumValue: explicit_bucket_histogram
+ description: TODO
isSdkExtensionPlugin: false
- type: ExporterTemporalityPreference
- properties: []
+ enumValues:
+ - enumValue: cumulative
+ description: TODO
+ - enumValue: delta
+ description: TODO
+ - enumValue: low_memory
+ description: TODO
isSdkExtensionPlugin: false
- type: GrpcTls
properties:
@@ -508,7 +540,21 @@
If omitted, .included attributes are included.
isSdkExtensionPlugin: false
- type: InstrumentType
- properties: []
+ enumValues:
+ - enumValue: counter
+ description: TODO
+ - enumValue: gauge
+ description: TODO
+ - enumValue: histogram
+ description: TODO
+ - enumValue: observable_counter
+ description: TODO
+ - enumValue: observable_gauge
+ description: TODO
+ - enumValue: observable_up_down_counter
+ description: TODO
+ - enumValue: up_down_counter
+ description: TODO
isSdkExtensionPlugin: false
- type: JaegerPropagator
properties: []
@@ -718,7 +764,11 @@
description: Configure TLS settings for the exporter.
isSdkExtensionPlugin: false
- type: OtlpHttpEncoding
- properties: []
+ enumValues:
+ - enumValue: json
+ description: Protobuf JSON encoding.
+ - enumValue: protobuf
+ description: Protobuf binary encoding.
isSdkExtensionPlugin: false
- type: OtlpHttpExporter
properties:
diff --git a/schema/resource.json b/schema/resource.json
index 9d4420b8..859ddf27 100644
--- a/schema/resource.json
+++ b/schema/resource.json
@@ -50,7 +50,6 @@
"AttributeType": {
"type": ["string", "null"],
"enum": [
- null,
"string",
"bool",
"int",
diff --git a/scripts/generate-markdown.js b/scripts/generate-markdown.js
index ea1b9394..5bbc0bc5 100644
--- a/scripts/generate-markdown.js
+++ b/scripts/generate-markdown.js
@@ -51,40 +51,55 @@ metaSchema.types.forEach(metaSchemaType => {
output.push(`\`${type}\` is an [SDK extension plugin](#sdk-extension-plugins).\n\n`);
}
- // Properties
- if (metaSchemaType.properties.length === 0) {
- output.push("No properties.\n\n");
- } else {
- // Property type and description table
- output.push(`| Property | Type | Required? | Constraints | Description |\n`);
- output.push("|---|---|---|---|---|\n");
- metaSchemaType.properties.forEach(property => {
- const jsonSchemaProperty = jsonSchemaType.properties.find(item => item.property === property.property);
- if (!jsonSchemaProperty) {
- throw new Error(`JSON schema property not found for property ${property.property} and type ${type}.`);
- }
- let formattedProperty = `\`${property.property}\``
- if (isExperimentalProperty(property.property)) {
- formattedProperty += '
**WARNING:** This property is [experimental](README.md#experimental-features).'
- }
- const formattedPropertyType = formatJsonSchemaPropertyType(jsonSchemaProperty, jsonSchemaTypesByType);
- const isRequired = required !== undefined && required.includes(property.property);
- let formattedConstraints = resolveAndFormatConstraints(jsonSchemaProperty.schema, '
');
- if (formattedConstraints.length === 0) {
- formattedConstraints = 'No constraints.';
- }
- const formattedDescription = property.description.split("\n").join("
");
-
- output.push(`| ${formattedProperty} | ${formattedPropertyType} | \`${isRequired}\` | ${formattedConstraints} | ${formattedDescription} |\n`);
+ if (jsonSchemaType.isEnumType()) {
+ // Enum values
+ output.push("This is a enum type.\n\n");
+ output.push(`| Value | Description |\n`);
+ output.push(`|---|---|\n`);
+ metaSchemaType.enumValues.forEach(enumValue => {
+ const formattedDescription = enumValue.description.split("\n").join("
");
+ output.push(`| \`${enumValue.enumValue}\` | ${formattedDescription} |\n`);
});
output.push('\n');
+ } else {
+ // Properties
+ if (metaSchemaType.properties.length === 0) {
+ output.push("No properties.\n\n");
+ } else {
+ // Property type and description table
+ output.push(`| Property | Type | Required? | Constraints | Description |\n`);
+ output.push("|---|---|---|---|---|\n");
+ metaSchemaType.properties.forEach(property => {
+ const jsonSchemaProperty = jsonSchemaType.properties.find(item => item.property === property.property);
+ if (!jsonSchemaProperty) {
+ throw new Error(`JSON schema property not found for property ${property.property} and type ${type}.`);
+ }
+ let formattedProperty = `\`${property.property}\``
+ if (isExperimentalProperty(property.property)) {
+ formattedProperty += '
**WARNING:** This property is [experimental](README.md#experimental-features).'
+ }
+ const formattedPropertyType = formatJsonSchemaPropertyType(jsonSchemaProperty, jsonSchemaTypesByType);
+ const isRequired = required !== undefined && required.includes(property.property);
+ let formattedConstraints = resolveAndFormatConstraints(jsonSchemaProperty.schema, '
');
+ if (formattedConstraints.length === 0) {
+ formattedConstraints = 'No constraints.';
+ }
+ const formattedDescription = property.description.split("\n").join("
");
+
+ output.push(`| ${formattedProperty} | ${formattedPropertyType} | \`${isRequired}\` | ${formattedConstraints} | ${formattedDescription} |\n`);
+ });
+ output.push('\n');
+ }
+ }
- // Write language support status for type
+ // Write language support status for type
+ if ((jsonSchemaType.isEnumType() && metaSchemaType.enumValues.length > 0) || (!jsonSchemaType.isEnumType() && jsonSchemaType.properties.length > 0)) {
output.push(`\n`);
output.push('Language support status
\n\n');
const languageImplementationsByLanguage = {};
metaSchema.languageImplementations.forEach(languageImplementation => languageImplementationsByLanguage[languageImplementation.language] = languageImplementation);
- output.push('| Property |');
+ const rowHeader = jsonSchemaType.isEnumType() ? 'Value' : 'Property';
+ output.push(`| ${rowHeader} |`);
KNOWN_LANGUAGES.forEach(language => {
output.push(` [${language}](#${language}) |`);
if (!languageImplementationsByLanguage[language]) {
@@ -95,19 +110,36 @@ metaSchema.types.forEach(metaSchemaType => {
output.push('|---|');
KNOWN_LANGUAGES.forEach(language => output.push(`---|`));
output.push('\n');
- metaSchemaType.properties.forEach(property => {
- output.push(`| \`${property.property}\` |`);
- KNOWN_LANGUAGES.forEach(language => {
- const typeSupportStatus = languageImplementationsByLanguage[language].typeSupportStatuses.find(item => item.type === type);
- if (!typeSupportStatus) {
- throw new Error(`Meta schema LanguageImplementation for language ${language} missing type ${type}.`);
- }
- const propertyOverride = typeSupportStatus.propertyOverrides.find(propertyOverride => propertyOverride.property === property.property);
- const status = propertyOverride ? propertyOverride.status : typeSupportStatus.status;
- output.push(` ${status} |`);
+ if (jsonSchemaType.isEnumType()) {
+ metaSchemaType.enumValues.forEach(enumValue => {
+ output.push(`| \`${enumValue.enumValue}\` |`);
+ KNOWN_LANGUAGES.forEach(language => {
+ const typeSupportStatus = languageImplementationsByLanguage[language].typeSupportStatuses.find(item => item.type === type);
+ if (!typeSupportStatus) {
+ throw new Error(`Meta schema LanguageImplementation for language ${language} missing type ${type}.`);
+ }
+ const enumValueOverride = typeSupportStatus.enumOverrides.find(enumOverride => enumOverride.enumValue === enumValue.enumValue);
+ const status = enumValueOverride ? enumValueOverride.status : typeSupportStatus.status;
+ output.push(` ${status} |`);
+ });
+ output.push('\n');
});
- output.push('\n');
- });
+ } else {
+ metaSchemaType.properties.forEach(property => {
+ output.push(`| \`${property.property}\` |`);
+ KNOWN_LANGUAGES.forEach(language => {
+ const typeSupportStatus = languageImplementationsByLanguage[language].typeSupportStatuses.find(item => item.type === type);
+ if (!typeSupportStatus) {
+ throw new Error(`Meta schema LanguageImplementation for language ${language} missing type ${type}.`);
+ }
+ const propertyOverride = typeSupportStatus.propertyOverrides.find(propertyOverride => propertyOverride.property === property.property);
+ const status = propertyOverride ? propertyOverride.status : typeSupportStatus.status;
+ output.push(` ${status} |`);
+ });
+ output.push('\n');
+ });
+ }
+
output.push(` \n\n`)
}
@@ -157,7 +189,7 @@ KNOWN_LANGUAGES.forEach(language => {
}
output.push(`Latest supported file format: \`${languageImplementation.latestSupportedFileFormat}\`\n\n`);
- output.push(`| Type | Status | Notes | Property Support Status |\n`);
+ output.push(`| Type | Status | Notes | Support Status Details |\n`);
output.push(`|---|---|---|---|\n`);
languageImplementation.typeSupportStatuses.forEach(typeSupportStatus => {
const metaSchemaType = metaSchema.types.find(item => item.type === typeSupportStatus.type);
@@ -165,14 +197,23 @@ KNOWN_LANGUAGES.forEach(language => {
throw new Error(`MetaSchemaType not found for type ${typeSupportStatus.type}.`);
}
- const propertySupportStatus = [];
- metaSchemaType.properties.forEach(metaSchemaProperty => {
- const propertyOverride = typeSupportStatus.propertyOverrides.find(propertyOverride => propertyOverride.property === metaSchemaProperty.property);
- const status = propertyOverride ? propertyOverride.status : typeSupportStatus.status;
- propertySupportStatus.push(`* \`${metaSchemaProperty.property}\`: ${status}
`) ;
- });
+ const supportStatusDetails = [];
+
+ if (metaSchemaType.properties !== null) {
+ metaSchemaType.properties.forEach(metaSchemaProperty => {
+ const propertyOverride = typeSupportStatus.propertyOverrides.find(propertyOverride => propertyOverride.property === metaSchemaProperty.property);
+ const status = propertyOverride ? propertyOverride.status : typeSupportStatus.status;
+ supportStatusDetails.push(`* \`${metaSchemaProperty.property}\`: ${status}
`);
+ });
+ } else {
+ metaSchemaType.enumValues.forEach(metaSchemaEnumValue => {
+ const enumValueOverride = typeSupportStatus.enumOverrides.find(enumOverride => enumOverride.enumValue === metaSchemaEnumValue.enumValue);
+ const status = enumValueOverride ? enumValueOverride.status : typeSupportStatus.status;
+ supportStatusDetails.push(`* \`${metaSchemaEnumValue.enumValue}\`: ${status}
`);
+ });
+ }
- output.push(`| [\`${typeSupportStatus.type}\`](#${typeSupportStatus.type.toLowerCase()}) | ${typeSupportStatus.status} | ${typeSupportStatus.notes} | ${propertySupportStatus.join('')} |\n`);
+ output.push(`| [\`${typeSupportStatus.type}\`](#${typeSupportStatus.type.toLowerCase()}) | ${typeSupportStatus.status} | ${typeSupportStatus.notes} | ${supportStatusDetails.join('')} |\n`);
});
output.push(`\n\n`);
});
@@ -245,8 +286,8 @@ function resolveAndFormatConstraints(schema, linebreak) {
'minContains',
'maxContains',
'uniqueItems',
- 'enum',
'const',
+ // skip enum because we have special formatting for enum types
];
constraintPropertyNames.forEach(propertyName => {
diff --git a/scripts/json-schema.js b/scripts/json-schema.js
index 9e924eb2..d2158ebb 100644
--- a/scripts/json-schema.js
+++ b/scripts/json-schema.js
@@ -1,5 +1,5 @@
import fs from 'fs';
-import {MetaSchemaProperty, MetaSchemaType} from "./meta-schema.js";
+import {MetaSchemaEnumValue, MetaSchemaProperty, MetaSchemaType} from "./meta-schema.js";
import {schemaDirPath} from "./util.js";
const localDefPrefix = '#/$defs/';
@@ -16,7 +16,7 @@ export function readJsonSchemaTypes() {
topLevelSchemas[file] = fileContent;
if (file === 'opentelemetry_configuration.json') {
- typesByType['OpenTelemetryConfiguration'] = new JsonSchemaType('OpentelemetryConfiguration', file, fileContent, '.', fileContent);
+ typesByType['OpenTelemetryConfiguration'] = new JsonSchemaType('OpentelemetryConfiguration', file, fileContent, '.', fileContent, []);
}
Object.entries(getDefs(fileContent)).forEach(([type, schema]) => {
@@ -43,9 +43,13 @@ export function readJsonSchemaTypes() {
jsonSchemaType.schema = topLevelSchema;
});
- // Resolve properties
+ // Resolve properties, enum values
Object.values(typesByType).forEach(jsonSchemaType => {
jsonSchemaType.properties = resolveJsonSchemaProperties(jsonSchemaType.schema, typesByType);
+ jsonSchemaType.enumValues = resolveEnumValues(jsonSchemaType);
+ if (jsonSchemaType.properties.length > 0 && jsonSchemaType.enumValues !== null) {
+ throw new Error(`${jsonSchemaType.type} has enum values and properties`);
+ }
});
return Object.values(typesByType);
@@ -98,6 +102,14 @@ function resolveJsonSchemaProperties(jsonSchema, typesByType) {
return resolvedProperties;
}
+function resolveEnumValues(jsonSchemaType) {
+ const enumValues = jsonSchemaType.schema['enum'];
+ if (!enumValues) {
+ return null;
+ }
+ return enumValues;
+}
+
export function resolveRef(ref, typesByType) {
let response;
if (ref.startsWith(localDefPrefix)) {
@@ -143,6 +155,7 @@ export class JsonSchemaType {
jsonSchemaPath;
schema;
properties;
+ enumValues; // null if not enum
constructor(type, file, fileContent, jsonSchemaPath, schema) {
this.type = type;
@@ -151,6 +164,11 @@ export class JsonSchemaType {
this.jsonSchemaPath = jsonSchemaPath;
this.schema = schema;
this.properties = [];
+ this.enumValues = null;
+ }
+
+ isEnumType() {
+ return this.enumValues !== null;
}
jsonSchemaRef() {
@@ -165,6 +183,7 @@ export class JsonSchemaType {
return new MetaSchemaType(
this.type,
this.properties.map(jsonSchemaProperty => new MetaSchemaProperty(jsonSchemaProperty.property, "TODO")),
+ this.enumValues === null ? null : this.enumValues.map(enumValue => new MetaSchemaEnumValue(enumValue, "TODO")),
false
);
}
diff --git a/scripts/meta-schema.js b/scripts/meta-schema.js
index bc4aabb4..8bd8678e 100644
--- a/scripts/meta-schema.js
+++ b/scripts/meta-schema.js
@@ -94,21 +94,36 @@ export class MetaSchema {
export class MetaSchemaType {
type;
- properties;
+ properties; // null if enum
+ enumValues; // null if not enum
isSdkExtensionPlugin;
- constructor(type, properties, isSdkExtensionPlugin) {
+ constructor(type, properties, enumValues, isSdkExtensionPlugin) {
this.type = type;
this.properties = properties;
+ this.enumValues = enumValues;
this.isSdkExtensionPlugin = isSdkExtensionPlugin;
}
toJson() {
- const properties = this.properties.map(property => property.toJson());
- properties.sort((a, b) => a.property.localeCompare(b.property));
+ const json = {type: this.type};
- return {type: this.type, properties: this.properties, isSdkExtensionPlugin: this.isSdkExtensionPlugin};
+ if (this.enumValues !== null) {
+ const enumValues = this.enumValues.map(enumValue => enumValue.toJson());
+ enumValues.sort((a, b) => a.enumValue.localeCompare(b.enumValue));
+ json.enumValues = enumValues;
+ }
+ if (this.properties !== null) {
+ const properties = this.properties.map(property => property.toJson());
+ // TODO(jack-berg): sort in separate PR to make review easier
+ // properties.sort((a, b) => a.property.localeCompare(b.property));
+ json.properties = properties;
+ }
+
+ json.isSdkExtensionPlugin = this.isSdkExtensionPlugin;
+
+ return json;
}
static parseJson(rawJson, messages) {
@@ -119,9 +134,18 @@ export class MetaSchemaType {
entryJson => MetaSchemaProperty.parseJson(entryJson, messages),
`MetaSchemaType '${type}' has invalid 'properties'`,
error => `MetaSchemaType '${type}' has invalid property: ${error.message}. Skipping.`,
- messages);
+ messages,
+ true);
+ const enumValues = parseArray(
+ rawJson,
+ 'enumValues',
+ entryJson => MetaSchemaEnumValue.parseJson(entryJson, messages),
+ `MetaSchemaType '${type}' has invalid 'enumValues'`,
+ error => `MetaSchemaType '${type}' has invalid enumValue: ${error.message}. Skipping.`,
+ messages,
+ true);
const isSdkExtensionPlugin = parseBoolean(rawJson, 'isSdkExtensionPlugin', `MetaSchemaType has invalid 'isSdkExtensionPlugin'`);
- return new MetaSchemaType(type, properties, isSdkExtensionPlugin);
+ return new MetaSchemaType(type, properties, enumValues, isSdkExtensionPlugin);
}
}
@@ -145,6 +169,26 @@ export class MetaSchemaProperty {
}
}
+export class MetaSchemaEnumValue {
+ enumValue;
+ description;
+
+ constructor(enumValue, description) {
+ this.enumValue = enumValue;
+ this.description = description;
+ }
+
+ toJson() {
+ return {enumValue: this.enumValue, description: this.description};
+ }
+
+ static parseJson(rawJson, messages) {
+ const enumValue = parseString(rawJson, 'enumValue', `MetaSchemaEnumValue has invalid 'enumValue'`);
+ const description = parseString(rawJson, 'description', `MetaSchemaEnumValue has invalid 'description'`);
+ return new MetaSchemaEnumValue(enumValue, description);
+ }
+}
+
export class LanguageImplementation {
language;
latestSupportedFileFormat;
@@ -182,26 +226,33 @@ export class LanguageImplementation {
export class TypeSupportStatus {
type;
status;
- propertyOverrides;
+ propertyOverrides; // null if enum
+ enumOverrides; // null if not enum
notes;
- constructor(type, status, propertyOverrides, notes) {
+ constructor(type, status, propertyOverrides, enumOverrides, notes) {
this.type = type;
this.status = status;
this.propertyOverrides = propertyOverrides;
+ this.enumOverrides = enumOverrides;
this.notes = notes;
}
toJson() {
- const propertyOverrides = this.propertyOverrides.map(propertyStatus => propertyStatus.toJson());
- propertyOverrides.sort((a, b) => a.property.localeCompare(b.property));
+ const json = {type: this.type, status: this.status, notes: this.notes};
- return {
- type: this.type,
- status: this.status,
- notes: this.notes,
- propertyOverrides
- };
+ if (this.enumOverrides !== null) {
+ const enumOverrides = this.enumOverrides.map(enumValueStatus => enumValueStatus.toJson());
+ enumOverrides.sort((a, b) => a.enumValue.localeCompare(b.enumValue));
+ json.enumOverrides = enumOverrides;
+ }
+ if (this.propertyOverrides !== null) {
+ const propertyOverrides = this.propertyOverrides.map(propertyStatus => propertyStatus.toJson());
+ propertyOverrides.sort((a, b) => a.property.localeCompare(b.property));
+ json.propertyOverrides = propertyOverrides;
+ }
+
+ return json;
}
static parseJson(rawJson, messages) {
@@ -213,9 +264,18 @@ export class TypeSupportStatus {
entryJson => PropertyStatus.parseJson(entryJson, messages),
`TypeSupportStatus '${type}' has invalid 'propertyOverrides'`,
error => `TypeSupportStatus '${type}' has invalid PropertyStatus: ${error.message}. Skipping.`,
- messages)
+ messages,
+ true);
+ const enumOverrides = parseArray(
+ rawJson,
+ 'enumOverrides',
+ entryJson => EnumValueStatus.parseJson(entryJson, messages),
+ `TypeSupportStatus '${type}' has invalid 'enumOverrides'`,
+ error => `TypeSupportStatus '${type}' has invalid EnumValueStatus: ${error.message}. Skipping.`,
+ messages,
+ true);
const notes = parseString(rawJson, 'notes', `TypeSupportStatus has invalid 'notes'`);
- return new TypeSupportStatus(type, status, propertyOverrides, notes);
+ return new TypeSupportStatus(type, status, propertyOverrides, enumOverrides, notes);
}
}
@@ -242,6 +302,29 @@ export class PropertyStatus {
}
}
+export class EnumValueStatus {
+ enumValue;
+ status;
+
+ constructor(enumValue, status) {
+ this.enumValue = enumValue;
+ this.status = status;
+ }
+
+ toJson() {
+ return {
+ enumValue: this.enumValue,
+ status: this.status
+ };
+ }
+
+ static parseJson(rawJson, messages) {
+ const enumValue = parseString(rawJson, 'enumValue', `EnumValueStatus has invalid 'enumValue'`);
+ const status = parseEnum(rawJson, 'status', `EnumValueStatus has invalid 'status'`, IMPLEMENTATION_STATUSES);
+ return new EnumValueStatus(enumValue, status);
+ }
+}
+
// Helper functions
function reconcileTypes(metaSchema, jsonSchemaTypesByType, messages) {
@@ -255,32 +338,73 @@ function reconcileTypes(metaSchema, jsonSchemaTypesByType, messages) {
return;
}
const sanitizedProperties = [];
- const jsonSchemaProperties = jsonSchemaType.toMetaSchemaType().properties;
-
- // Remove properties in meta schema and not in json schema
- const jsonSchemaPropertiesByProperty = {};
- jsonSchemaProperties.forEach(property => jsonSchemaPropertiesByProperty[property.property] = property);
- metaSchemaType.properties.forEach(property => {
- const propertyName = property.property;
- if (!(propertyName in jsonSchemaPropertiesByProperty)) {
- messages.push(`Type ${type} has property ${propertyName} in meta schema and not in JSON schema. Removing.`);
- return;
+ const emptyMetaSchemaType = jsonSchemaType.toMetaSchemaType();
+ const jsonSchemaProperties = emptyMetaSchemaType.properties;
+
+ if (!jsonSchemaType.isEnumType()) {
+ if (metaSchemaType.properties === null) {
+ messages.push(`Type ${type} in meta schema is missing properties and is not an enum type. Adding.`);
+ metaSchemaType.properties = [];
+ }
+ if (metaSchemaType.enumValues !== null) {
+ messages.push(`Type ${type} in meta schema has enumValues but is not an enum type. Removing.`);
+ metaSchemaType.enumValues = null;
}
- sanitizedProperties.push(property);
- });
- // Add properties in json schema and not in meta schema
- const metaSchemaPropertiesByProperty = {};
- metaSchemaType.properties.forEach(property => metaSchemaPropertiesByProperty[property.property] = property);
- jsonSchemaProperties.forEach(property => {
- const propertyName = property.property;
- if (!(propertyName in metaSchemaPropertiesByProperty)) {
- messages.push(`Type ${type} has property ${propertyName} in JSON schema and not in meta schema. Adding.`);
+ const jsonSchemaPropertiesByProperty = {};
+
+ // Remove properties in meta schema and not in json schema
+ jsonSchemaProperties.forEach(property => jsonSchemaPropertiesByProperty[property.property] = property);
+ metaSchemaType.properties.forEach(property => {
+ const propertyName = property.property;
+ if (!(propertyName in jsonSchemaPropertiesByProperty)) {
+ messages.push(`Type ${type} has property ${propertyName} in meta schema and not in JSON schema. Removing.`);
+ return;
+ }
sanitizedProperties.push(property);
+ });
+ // Add properties in json schema and not in meta schema
+ const metaSchemaPropertiesByProperty = {};
+ metaSchemaType.properties.forEach(property => metaSchemaPropertiesByProperty[property.property] = property);
+ jsonSchemaProperties.forEach(property => {
+ const propertyName = property.property;
+ if (!(propertyName in metaSchemaPropertiesByProperty)) {
+ messages.push(`Type ${type} has property ${propertyName} in JSON schema and not in meta schema. Adding.`);
+ sanitizedProperties.push(property);
+ }
+ });
+
+ metaSchemaType.properties = sanitizedProperties;
+ } else {
+ if (metaSchemaType.enumValues === null) {
+ messages.push(`Type ${type} in meta schema is missing enumValues and is an enum type. Adding.`);
+ metaSchemaType.enumValues = [];
}
- });
+ if (metaSchemaType.properties !== null) {
+ messages.push(`Type ${type} in meta schema has properties but is an enum type. Removing.`);
+ metaSchemaType.properties = null;
+ }
+
+ const sanitizedEnumValues = [];
- metaSchemaType.properties = sanitizedProperties;
+ // Remove enumValues in meta schema and not in json schema
+ metaSchemaType.enumValues.forEach(enumValue => {
+ if (!(emptyMetaSchemaType.enumValues.find(item => item.enumValue === enumValue.enumValue))) {
+ messages.push(`Type ${type} has enumValue ${enumValue.enumValue} in meta schema and not in JSON schema. Removing.`);
+ return;
+ }
+ sanitizedEnumValues.push(enumValue);
+ });
+ // Add enumValues in json schema and not in meta schema
+ emptyMetaSchemaType.enumValues.forEach(enumValue => {
+ if (!(metaSchemaType.enumValues.find(item => item.enumValue === enumValue.enumValue))) {
+ messages.push(`Type ${type} has enumValue ${enumValue.enumValue} in JSON schema and not in meta schema. Adding.`);
+ sanitizedEnumValues.push(enumValue);
+ }
+ });
+
+ metaSchemaType.enumValues = sanitizedEnumValues;
+ }
});
// Find and remove any types in meta schema not in json schema
@@ -322,16 +446,46 @@ function reconcileLanguageImplementations(metaSchema, jsonSchemaTypesByType, mes
messages.push(`LanguageImplementation ${language} has type ${typeSupportStatus.type} in meta schema and not in JSON schema. Removing.`);
return;
}
- // Remove any propertyOverrides which occur in meta schema but not json schema
- const reconciledPropertyOverrides = [];
- typeSupportStatus.propertyOverrides.forEach(propertyStatus => {
- if (!jsonSchemaType.properties.find(jsonSchemaProperty => jsonSchemaProperty.property === propertyStatus.property)) {
- messages.push(`LanguageImplementation ${language} type ${typeSupportStatus.type} has propertyOverride ${propertyStatus.property} in meta schema and not in JSON schema. Removing.`);
- return;
+ if (!jsonSchemaType.isEnumType()) {
+ if (typeSupportStatus.propertyOverrides === null) {
+ messages.push(`LanguageImplementation ${language} type ${typeSupportStatus.type} is missing propertyOverrides in meta schema and is not an enum type. Adding.`);
+ typeSupportStatus.propertyOverrides = [];
}
- reconciledPropertyOverrides.push(propertyStatus);
- });
- typeSupportStatus.propertyOverrides = reconciledPropertyOverrides;
+ if (typeSupportStatus.enumOverrides !== null) {
+ messages.push(`LanguageImplementation ${language} type ${typeSupportStatus.type} has propertyOverrides in meta schema but is not an enum type. Removing.`);
+ typeSupportStatus.propertyOverrides = null;
+ }
+ // Remove any propertyOverrides which occur in meta schema but not json schema
+ const reconciledPropertyOverrides = [];
+ typeSupportStatus.propertyOverrides.forEach(propertyStatus => {
+ if (!jsonSchemaType.properties.find(jsonSchemaProperty => jsonSchemaProperty.property === propertyStatus.property)) {
+ messages.push(`LanguageImplementation ${language} type ${typeSupportStatus.type} has propertyOverride ${propertyStatus.property} in meta schema and not in JSON schema. Removing.`);
+ return;
+ }
+ reconciledPropertyOverrides.push(propertyStatus);
+ });
+ typeSupportStatus.propertyOverrides = reconciledPropertyOverrides;
+ } else {
+ if (typeSupportStatus.enumOverrides === null) {
+ messages.push(`LanguageImplementation ${language} type ${typeSupportStatus.type} is missing enumOverrides in meta schema and is an enum type. Adding.`);
+ typeSupportStatus.enumOverrides = [];
+ }
+ if (typeSupportStatus.propertyOverrides !== null) {
+ messages.push(`LanguageImplementation ${language} type ${typeSupportStatus.type} has propertyOverrides in meta schema but is an enum type. Removing.`);
+ typeSupportStatus.propertyOverrides = null;
+ }
+ // Remove any enumOverrides which occur in meta schema but not json schema
+ const reconciledEnumOverrides = [];
+ typeSupportStatus.enumOverrides.forEach(enumValueStatus => {
+ if (!jsonSchemaType.enumValues.includes(enumValueStatus.enumValue)) {
+ messages.push(`LanguageImplementation ${language} type ${typeSupportStatus.type} has enumOverride ${enumValueStatus.enumValue} in meta schema and not in JSON schema. Removing.`);
+ return;
+ }
+ reconciledEnumOverrides.push(enumValueStatus);
+ });
+ typeSupportStatus.enumOverrides = reconciledEnumOverrides;
+ }
+
reconciledTypeSupportStatuses.push(typeSupportStatus);
});
@@ -371,7 +525,7 @@ function emptyLanguageImplementation(language, metaSchema) {
return new LanguageImplementation(
language,
'TODO',
- metaSchema.types.map(metaSchemaType => new TypeSupportStatus(metaSchemaType.type, IMPLEMENTATION_STATUS_UNKNOWN, [], '')));
+ metaSchema.types.map(metaSchemaType => new TypeSupportStatus(metaSchemaType.type, IMPLEMENTATION_STATUS_UNKNOWN, [], metaSchemaType.enumValues === null ? null : [], '')));
}
function parseEnum(rawJson, propertyName, errorMessage, knownValues) {
@@ -398,8 +552,11 @@ function parseBoolean(rawJson, propertyName, errorMessage) {
return property;
}
-function parseArray(rawJson, propertyName, entryParser, errorMessage, entryErrorFormatter, messages) {
+function parseArray(rawJson, propertyName, entryParser, errorMessage, entryErrorFormatter, messages, nullable = false) {
const property = rawJson[propertyName];
+ if ((property === null || property === undefined) && nullable) {
+ return null;
+ }
return parseArrayValue(property, entryParser, errorMessage, entryErrorFormatter, messages);
}