Skip to content

Commit

Permalink
update certain properties to be required in openapi.yaml (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
tigerinus authored Nov 13, 2022
1 parent b9b6394 commit 0d7d0a6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions api/message_bus/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,8 @@ components:

PropertyType:
type: object
required:
- "name"
properties:
name:
type: string
Expand Down Expand Up @@ -497,6 +499,9 @@ components:

Property:
type: object
required:
- "name"
- "value"
properties:
name:
type: string
Expand Down
4 changes: 2 additions & 2 deletions route/adapter/in/property.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

func PropertyAdapter(property codegen.Property) model.Property {
return model.Property{
Name: *property.Name,
Value: *property.Value,
Name: property.Name,
Value: property.Value,
}
}
2 changes: 1 addition & 1 deletion route/adapter/in/property_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import (

func PropertyTypeAdapter(propertyType codegen.PropertyType) model.PropertyType {
return model.PropertyType{
Name: *propertyType.Name,
Name: propertyType.Name,
}
}
4 changes: 2 additions & 2 deletions route/adapter/out/property.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

func PropertyAdapter(property model.Property) codegen.Property {
return codegen.Property{
Name: &property.Name,
Value: &property.Value,
Name: property.Name,
Value: property.Value,
}
}
2 changes: 1 addition & 1 deletion route/adapter/out/property_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import (

func PropertyTypeAdapter(propertyType model.PropertyType) codegen.PropertyType {
return codegen.PropertyType{
Name: &propertyType.Name,
Name: propertyType.Name,
}
}

0 comments on commit 0d7d0a6

Please sign in to comment.