Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add description attribute to message objects #535

Merged
merged 3 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/controllers/api/messages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def permitted_message_draft_params
],
objects: [
:name,
:description,
:is_signed,
:to_be_signed,
:mimetype,
Expand Down
1 change: 1 addition & 0 deletions app/jobs/govbox/submit_message_draft_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def build_objects(message_draft)
objects << {
id: object.uuid,
name: object.name,
description: object.description,
encoding: "Base64",
signed: object.is_signed,
mime_type: object.mimetype,
Expand Down
1 change: 1 addition & 0 deletions app/models/message_object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Table name: message_objects
#
# id :bigint not null, primary key
# description :string
# is_signed :boolean
# mimetype :string
# name :string
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddDescriptionToMessageObjects < ActiveRecord::Migration[7.1]
def change
add_column :message_objects, :description, :string
end
end
3 changes: 2 additions & 1 deletion db/schema.rb

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

5 changes: 4 additions & 1 deletion public/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,10 @@ paths:
description: Názov objektu
type: string
nullable: true
description:
description: Popis objektu
type: string
nullable: true
is_signed:
description: Indikátor či je obsah objektu podpísaný
type: boolean
Expand Down Expand Up @@ -389,7 +393,6 @@ paths:
items:
type: string
required:
- name
- mimetype
- is_signed
- object_type
Expand Down
Loading