Skip to content

Commit

Permalink
DynamoDB support for x-nullable (#415)
Browse files Browse the repository at this point in the history
* Added tests, simplified code
  • Loading branch information
18vijayb authored Feb 19, 2022
1 parent f0fc88e commit e2e4951
Show file tree
Hide file tree
Showing 27 changed files with 4,964 additions and 127 deletions.
4 changes: 3 additions & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
v8.1.4
v8.1.5

v8.1.5: Fixed dynamodb codegen error involving fields marked with x-nullable

v8.1.4: Add dynamodb codegen support for batch writing arrays of objects

Expand Down
25 changes: 25 additions & 0 deletions samples/db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ definitions:
AllowSecondaryIndexScan:
- thingID
- name-createdAt
- name-rangeNullable
DynamoDB:
KeySchema:
- AttributeName: name
Expand All @@ -70,6 +71,22 @@ definitions:
KeyType: HASH
- AttributeName: createdAt
KeyType: RANGE
- IndexName: name-rangeNullable
Projection:
ProjectionType: ALL
KeySchema:
- AttributeName: name
KeyType: HASH
- AttributeName: rangeNullable
KeyType: RANGE
- IndexName: name-hashNullable
Projection:
ProjectionType: ALL
KeySchema:
- AttributeName: hashNullable
KeyType: HASH
- AttributeName: name
KeyType: RANGE
type: object
properties:
id:
Expand All @@ -81,6 +98,13 @@ definitions:
createdAt:
type: string
format: date-time
rangeNullable:
type: string
format: date-time
x-nullable: true
hashNullable:
type: string
x-nullable: true
category:
$ref: '#/definitions/Category'
nestedObject:
Expand Down Expand Up @@ -662,3 +686,4 @@ definitions:
KeyType: RANGE
Projection:
ProjectionType: ALL

15 changes: 15 additions & 0 deletions samples/gen-go-db-custom-path/db/dynamodb/dynamodb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e2e4951

Please sign in to comment.