Skip to content

Commit

Permalink
feat(API): remove valid? field
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasleger committed Feb 10, 2025
1 parent 86eb8f3 commit ef7ba05
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion app/controllers/api/v1/quote_checks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def metadata
def self.quote_check_json(quote_check = nil)
json_hash = quote_check.attributes.merge({ # Warning: attributes has stringifed keys, so use it too
"status" => quote_check.status,
"valid" => quote_check.quote_valid?,
"errors" => quote_check.validation_errors,
"error_details" => quote_check.validation_error_details,
"error_messages" => quote_check.validation_errors&.index_with do
Expand Down
2 changes: 1 addition & 1 deletion app/models/concerns/quote_check_post_check_metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def qa_model

# valid? is already used by the framework
def quote_valid?
validation_version.present? && validation_errors.blank?
status == "valid"
end

def status
Expand Down
1 change: 0 additions & 1 deletion spec/swagger_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@
filename: { type: :string, nullable: true },
metadata: { "$ref" => "#/components/schemas/quote_check_metadata", nullable: true },
profile: { "$ref" => "#/components/schemas/profile" },
valid: { type: :boolean, nullable: true },
gestes: {
type: :array,
items: {
Expand Down

0 comments on commit ef7ba05

Please sign in to comment.