Skip to content

Commit 1e08d11

Browse files
committed
Merge branch 'feature/date' into develop
2 parents 53e8bae + 7958924 commit 1e08d11

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

app/serializers/comment_serializer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
class CommentSerializer < ActiveModel::Serializer
2-
attributes :id, :body, :user
2+
attributes :id, :created_at, :updated_at, :body, :user
33
has_one :user
44
end

app/serializers/post_serializer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
class PostSerializer < ActiveModel::Serializer
22
include Rails.application.routes.url_helpers
3-
attributes :id, :title, :body, :category, :files, :comments_pagination
3+
attributes :id, :created_at, :updated_at, :title, :body, :category, :files, :comments_pagination
44
has_one :user
55
has_many :comments
66
def category

spec/swagger_helper.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@
107107
type: :object,
108108
properties: {
109109
id: { type: :integer },
110+
created_at: { type: :string },
111+
updated_at: { type: :string },
110112
title: { type: :string },
111113
body: { type: :string },
112114
user: { '$ref' => '#/definitions/user' },
@@ -135,6 +137,8 @@
135137
type: :object,
136138
properties: {
137139
id: { type: :integer },
140+
created_at: { type: :string },
141+
updated_at: { type: :string },
138142
body: { type: :string },
139143
user: { '$ref' => '#/definitions/user' }
140144
},

swagger/v1/swagger.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,10 @@ definitions:
946946
properties:
947947
id:
948948
type: integer
949+
created_at:
950+
type: string
951+
updated_at:
952+
type: string
949953
title:
950954
type: string
951955
body:
@@ -978,6 +982,10 @@ definitions:
978982
properties:
979983
id:
980984
type: integer
985+
created_at:
986+
type: string
987+
updated_at:
988+
type: string
981989
body:
982990
type: string
983991
user:

0 commit comments

Comments
 (0)