From 28482c72138c874d05fa880300a453ee3dd81855 Mon Sep 17 00:00:00 2001 From: Xiaoya Li Date: Mon, 15 May 2023 15:01:00 -0700 Subject: [PATCH] Minor: Setting Metadata and RuleSet to be optional (#38) --- api/openapi.yaml | 2 ++ docs/Config.md | 8 ++++---- docs/ConfigUpdateRequest.md | 8 ++++---- docs/RegisterSchemaRequest.md | 4 ++-- docs/SchemaString.md | 4 ++-- model_config.go | 8 ++++---- model_config_update_request.go | 8 ++++---- model_register_schema_request.go | 4 ++-- model_schema_string.go | 4 ++-- 9 files changed, 26 insertions(+), 24 deletions(-) diff --git a/api/openapi.yaml b/api/openapi.yaml index 5c4b153..e2f6ff8 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -3447,6 +3447,7 @@ components: type: object Metadata: description: User-defined metadata + nullable: true properties: tags: additionalProperties: @@ -3521,6 +3522,7 @@ components: type: object RuleSet: description: Schema rule set + nullable: true properties: migrationRules: items: diff --git a/docs/Config.md b/docs/Config.md index 8238461..c74cc8e 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -6,10 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **CompatibilityLevel** | **string** | Compatibility Level | [optional] **CompatibilityGroup** | **string** | | [optional] -**DefaultMetadata** | [**Metadata**](Metadata.md) | | [optional] -**OverrideMetadata** | [**Metadata**](Metadata.md) | | [optional] -**DefaultRuleSet** | [**RuleSet**](RuleSet.md) | | [optional] -**OverrideRuleSet** | [**RuleSet**](RuleSet.md) | | [optional] +**DefaultMetadata** | Pointer to [**Metadata**](Metadata.md) | | [optional] +**OverrideMetadata** | Pointer to [**Metadata**](Metadata.md) | | [optional] +**DefaultRuleSet** | Pointer to [**RuleSet**](RuleSet.md) | | [optional] +**OverrideRuleSet** | Pointer to [**RuleSet**](RuleSet.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ConfigUpdateRequest.md b/docs/ConfigUpdateRequest.md index b54bd7f..9fe1751 100644 --- a/docs/ConfigUpdateRequest.md +++ b/docs/ConfigUpdateRequest.md @@ -6,10 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Compatibility** | **string** | Compatibility Level | [optional] **CompatibilityGroup** | **string** | | [optional] -**DefaultMetadata** | [**Metadata**](Metadata.md) | | [optional] -**OverrideMetadata** | [**Metadata**](Metadata.md) | | [optional] -**DefaultRuleSet** | [**RuleSet**](RuleSet.md) | | [optional] -**OverrideRuleSet** | [**RuleSet**](RuleSet.md) | | [optional] +**DefaultMetadata** | Pointer to [**Metadata**](Metadata.md) | | [optional] +**OverrideMetadata** | Pointer to [**Metadata**](Metadata.md) | | [optional] +**DefaultRuleSet** | Pointer to [**RuleSet**](RuleSet.md) | | [optional] +**OverrideRuleSet** | Pointer to [**RuleSet**](RuleSet.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RegisterSchemaRequest.md b/docs/RegisterSchemaRequest.md index 814bca1..6c65fa6 100644 --- a/docs/RegisterSchemaRequest.md +++ b/docs/RegisterSchemaRequest.md @@ -8,8 +8,8 @@ Name | Type | Description | Notes **Id** | **int32** | Globally unique identifier of the schema | [optional] **SchemaType** | **string** | Schema type | [optional] **References** | [**[]SchemaReference**](SchemaReference.md) | References to other schemas | [optional] -**Metadata** | [**Metadata**](Metadata.md) | | [optional] -**RuleSet** | [**RuleSet**](RuleSet.md) | | [optional] +**Metadata** | Pointer to [**Metadata**](Metadata.md) | | [optional] +**RuleSet** | Pointer to [**RuleSet**](RuleSet.md) | | [optional] **Schema** | **string** | Schema definition string | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SchemaString.md b/docs/SchemaString.md index 3284c3e..af231a6 100644 --- a/docs/SchemaString.md +++ b/docs/SchemaString.md @@ -7,8 +7,8 @@ Name | Type | Description | Notes **SchemaType** | **string** | Schema type | [optional] **Schema** | **string** | Schema string identified by the ID | [optional] **References** | [**[]SchemaReference**](SchemaReference.md) | Schema references | [optional] -**Metadata** | [**Metadata**](Metadata.md) | | [optional] -**RuleSet** | [**RuleSet**](RuleSet.md) | | [optional] +**Metadata** | Pointer to [**Metadata**](Metadata.md) | | [optional] +**RuleSet** | Pointer to [**RuleSet**](RuleSet.md) | | [optional] **MaxId** | **int32** | Maximum ID | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/model_config.go b/model_config.go index c794e92..ff4ab66 100644 --- a/model_config.go +++ b/model_config.go @@ -13,8 +13,8 @@ type Config struct { // Compatibility Level CompatibilityLevel string `json:"compatibilityLevel,omitempty"` CompatibilityGroup string `json:"compatibilityGroup,omitempty"` - DefaultMetadata Metadata `json:"defaultMetadata,omitempty"` - OverrideMetadata Metadata `json:"overrideMetadata,omitempty"` - DefaultRuleSet RuleSet `json:"defaultRuleSet,omitempty"` - OverrideRuleSet RuleSet `json:"overrideRuleSet,omitempty"` + DefaultMetadata *Metadata `json:"defaultMetadata,omitempty"` + OverrideMetadata *Metadata `json:"overrideMetadata,omitempty"` + DefaultRuleSet *RuleSet `json:"defaultRuleSet,omitempty"` + OverrideRuleSet *RuleSet `json:"overrideRuleSet,omitempty"` } diff --git a/model_config_update_request.go b/model_config_update_request.go index 92eb1ee..680ff6c 100644 --- a/model_config_update_request.go +++ b/model_config_update_request.go @@ -13,8 +13,8 @@ type ConfigUpdateRequest struct { // Compatibility Level Compatibility string `json:"compatibility,omitempty"` CompatibilityGroup string `json:"compatibilityGroup,omitempty"` - DefaultMetadata Metadata `json:"defaultMetadata,omitempty"` - OverrideMetadata Metadata `json:"overrideMetadata,omitempty"` - DefaultRuleSet RuleSet `json:"defaultRuleSet,omitempty"` - OverrideRuleSet RuleSet `json:"overrideRuleSet,omitempty"` + DefaultMetadata *Metadata `json:"defaultMetadata,omitempty"` + OverrideMetadata *Metadata `json:"overrideMetadata,omitempty"` + DefaultRuleSet *RuleSet `json:"defaultRuleSet,omitempty"` + OverrideRuleSet *RuleSet `json:"overrideRuleSet,omitempty"` } diff --git a/model_register_schema_request.go b/model_register_schema_request.go index 8ea43bb..f8e5eec 100644 --- a/model_register_schema_request.go +++ b/model_register_schema_request.go @@ -18,8 +18,8 @@ type RegisterSchemaRequest struct { SchemaType string `json:"schemaType,omitempty"` // References to other schemas References []SchemaReference `json:"references,omitempty"` - Metadata Metadata `json:"metadata,omitempty"` - RuleSet RuleSet `json:"ruleSet,omitempty"` + Metadata *Metadata `json:"metadata,omitempty"` + RuleSet *RuleSet `json:"ruleSet,omitempty"` // Schema definition string Schema string `json:"schema,omitempty"` } diff --git a/model_schema_string.go b/model_schema_string.go index 952ae24..8db5dd8 100644 --- a/model_schema_string.go +++ b/model_schema_string.go @@ -16,8 +16,8 @@ type SchemaString struct { Schema string `json:"schema,omitempty"` // Schema references References []SchemaReference `json:"references,omitempty"` - Metadata Metadata `json:"metadata,omitempty"` - RuleSet RuleSet `json:"ruleSet,omitempty"` + Metadata *Metadata `json:"metadata,omitempty"` + RuleSet *RuleSet `json:"ruleSet,omitempty"` // Maximum ID MaxId int32 `json:"maxId,omitempty"` }