Skip to content

Commit

Permalink
New type schema (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
rambleraptor authored Sep 20, 2024
1 parent 3bd6113 commit 1c6d9c0
Show file tree
Hide file tree
Showing 7 changed files with 432 additions and 184 deletions.
4 changes: 2 additions & 2 deletions example/bookstore/v1/bookstore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ resources:
plural: "books"
properties:
isbn:
type: ARRAY
array_primitive_type: STRING
array_type:
type: STRING
number: 1
required: true
price:
Expand Down
4 changes: 2 additions & 2 deletions parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ func addGetToResource(pr *ParsedResource) {
// existence of path.
func addCommonFieldsToResource(pr *ParsedResource) {
pr.Properties[constants.FIELD_PATH_NAME] = &schema.Property{
Type: schema.Type_STRING,
Types: &schema.Property_Type{Type: schema.Type_STRING},
Number: 10000,
ReadOnly: true,
}
pr.Properties[constants.FIELD_ID_NAME] = &schema.Property{
Type: schema.Type_STRING,
Types: &schema.Property_Type{Type: schema.Type_STRING},
Number: 10001,
ReadOnly: true,
}
Expand Down
Loading

0 comments on commit 1c6d9c0

Please sign in to comment.