Skip to content

Commit

Permalink
adding extra fields for schema
Browse files Browse the repository at this point in the history
  • Loading branch information
shawn-hurley committed Feb 28, 2024
1 parent ff2bc5e commit ef228b9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
21 changes: 20 additions & 1 deletion cmd/analyzer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,26 @@ func createOpenAPISchema(providers map[string]provider.InternalProviderClient, l
fmt.Sprintf("%s.%s", provName, c.Name): {
Schema: c.Input.Schema,
},
// HERE WE NEED TO ADD NOT,FROM,AS,ETC
"from": {
Schema: &openapi3.Schema{
Type: &provider.SchemaTypeString,
},
},
"as": {
Schema: &openapi3.Schema{
Type: &provider.SchemaTypeString,
},
},
"ignore": {
Schema: &openapi3.Schema{
Type: &provider.SchemaTypeBool,
},
},
"not": {
Schema: &openapi3.Schema{
Type: &provider.SchemaTypeBool,
},
},
},
},
}
Expand Down
3 changes: 2 additions & 1 deletion provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ var (
SchemaTypeString openapi3.SchemaType = openapi3.SchemaTypeString
SchemaTypeArray openapi3.SchemaType = openapi3.SchemaTypeArray
SchemaTypeObject openapi3.SchemaType = openapi3.SchemaTypeObject
SChemaTypeNumber openapi3.SchemaType = openapi3.SchemaTypeInteger
SchemaTypeNumber openapi3.SchemaType = openapi3.SchemaTypeInteger
SchemaTypeBool openapi3.SchemaType = openapi3.SchemaTypeBoolean
)

// This will need a better name, may we want to move it to top level
Expand Down

0 comments on commit ef228b9

Please sign in to comment.