Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add omitempty to all struct tags of the Schema #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ import (

// Schema represents a JSON Typedef Schema.
type Schema struct {
Definitions map[string]Schema `json:"definitions"`
Metadata map[string]interface{} `json:"metadata"`
Nullable bool `json:"nullable"`
Ref *string `json:"ref"`
Type Type `json:"type"`
Enum []string `json:"enum"`
Elements *Schema `json:"elements"`
Properties map[string]Schema `json:"properties"`
OptionalProperties map[string]Schema `json:"optionalProperties"`
AdditionalProperties bool `json:"additionalProperties"`
Values *Schema `json:"values"`
Discriminator string `json:"discriminator"`
Mapping map[string]Schema `json:"mapping"`
Definitions map[string]Schema `json:"definitions,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
Nullable bool `json:"nullable,omitempty"`
Ref *string `json:"ref,omitempty"`
Type Type `json:"type,omitempty"`
Enum []string `json:"enum,omitempty"`
Elements *Schema `json:"elements,omitempty"`
Properties map[string]Schema `json:"properties,omitempty"`
OptionalProperties map[string]Schema `json:"optionalProperties,omitempty"`
AdditionalProperties bool `json:"additionalProperties,omitempty"`
Values *Schema `json:"values,omitempty"`
Discriminator string `json:"discriminator,omitempty"`
Mapping map[string]Schema `json:"mapping,omitempty"`
}

// Type represents the values that the JSON Typedef "type" keyword can take on.
Expand Down