propertyware 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/ci.yml +27 -0
- data/.github/workflows/publish.yml +48 -0
- data/.gitignore +39 -0
- data/.openapi-generator/FILES +375 -0
- data/.openapi-generator/VERSION +1 -0
- data/.openapi-generator/templates/ruby-client/gemspec.mustache +37 -0
- data/.openapi-generator/templates/ruby-client/partial_model_generic.mustache +371 -0
- data/.openapi-generator/templates/ruby-client/rubocop.mustache +124 -0
- data/.openapi-generator-ignore +23 -0
- data/.rspec +2 -0
- data/.rubocop.yml +124 -0
- data/CUSTOMIZATIONS.md +11 -0
- data/DOCS.md +673 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +76 -0
- data/README.md +93 -0
- data/Rakefile +10 -0
- data/bin/CUSTOMIZATIONS.md +11 -0
- data/bin/README.md +93 -0
- data/bin/config.yml +7 -0
- data/bin/fix_json.rb +59 -0
- data/bin/propertyware.json +1 -0
- data/bin/rebuild.sh +31 -0
- data/docs/Account.md +84 -0
- data/docs/AccountingApi.md +1235 -0
- data/docs/Address.md +28 -0
- data/docs/Amenity.md +24 -0
- data/docs/AutoJournalEntry.md +46 -0
- data/docs/AutoPayment.md +42 -0
- data/docs/Bank.md +52 -0
- data/docs/BankDeposit.md +32 -0
- data/docs/BasicVendor.md +40 -0
- data/docs/Bill.md +54 -0
- data/docs/BillPaid.md +24 -0
- data/docs/BillPay.md +20 -0
- data/docs/BillPayment.md +46 -0
- data/docs/BillSplit.md +42 -0
- data/docs/BillsApi.md +1391 -0
- data/docs/Building.md +116 -0
- data/docs/BuildingsApi.md +1037 -0
- data/docs/Campaign.md +60 -0
- data/docs/CampaignSource.md +26 -0
- data/docs/Charge.md +36 -0
- data/docs/ChargeTx.md +52 -0
- data/docs/Check.md +48 -0
- data/docs/CheckSplit.md +30 -0
- data/docs/Comment.md +28 -0
- data/docs/Contact.md +74 -0
- data/docs/ContactsApi.md +783 -0
- data/docs/Conversation.md +36 -0
- data/docs/CreditCardAccount.md +18 -0
- data/docs/CurrentAsset.md +30 -0
- data/docs/CurrentLiability.md +30 -0
- data/docs/CustomField.md +24 -0
- data/docs/Discount.md +40 -0
- data/docs/Document.md +40 -0
- data/docs/DocumentsApi.md +267 -0
- data/docs/Entry.md +34 -0
- data/docs/Equity.md +32 -0
- data/docs/ErrorResponse.md +22 -0
- data/docs/Expense.md +32 -0
- data/docs/GLItem.md +40 -0
- data/docs/HealthCheckApi.md +86 -0
- data/docs/Income.md +34 -0
- data/docs/Inspection.md +46 -0
- data/docs/InspectionArea.md +22 -0
- data/docs/InspectionItem.md +24 -0
- data/docs/InspectionsApi.md +193 -0
- data/docs/JournalEntry.md +36 -0
- data/docs/JournalEntrySplit.md +24 -0
- data/docs/JournalEntrySplitResponse.md +24 -0
- data/docs/LateFeeRule.md +26 -0
- data/docs/Lease.md +76 -0
- data/docs/LeaseClause.md +22 -0
- data/docs/LeaseContact.md +36 -0
- data/docs/LeasesApi.md +3319 -0
- data/docs/ManagementFee.md +30 -0
- data/docs/ManagementSettings.md +26 -0
- data/docs/Marketing.md +62 -0
- data/docs/NonCurrentAsset.md +26 -0
- data/docs/NonCurrentLiability.md +30 -0
- data/docs/NonOperatingExpense.md +32 -0
- data/docs/NonOperatingInome.md +32 -0
- data/docs/Note.md +28 -0
- data/docs/Owner.md +38 -0
- data/docs/OwnerContribution.md +44 -0
- data/docs/OwnerDraw.md +44 -0
- data/docs/Payment.md +50 -0
- data/docs/PaymentCharge.md +36 -0
- data/docs/Portfolio.md +60 -0
- data/docs/PortfoliosApi.md +701 -0
- data/docs/PropertyManager.md +26 -0
- data/docs/Prospect.md +114 -0
- data/docs/ProspectsApi.md +789 -0
- data/docs/RESTAPIBulkErrorResponse.md +22 -0
- data/docs/RESTAPIBulkSuccessResponse.md +18 -0
- data/docs/RESTAPIError.md +20 -0
- data/docs/Refund.md +44 -0
- data/docs/ResponseEntity.md +20 -0
- data/docs/SaveAccount.md +52 -0
- data/docs/SaveAddress.md +28 -0
- data/docs/SaveAdjustment.md +26 -0
- data/docs/SaveAutoCharge.md +28 -0
- data/docs/SaveBankDeposit.md +20 -0
- data/docs/SaveBill.md +42 -0
- data/docs/SaveBillPayment.md +30 -0
- data/docs/SaveBillSplit.md +36 -0
- data/docs/SaveBuilding.md +84 -0
- data/docs/SaveCharge.md +28 -0
- data/docs/SaveCheck.md +30 -0
- data/docs/SaveCheckSplit.md +30 -0
- data/docs/SaveComment.md +18 -0
- data/docs/SaveContact.md +60 -0
- data/docs/SaveConversation.md +20 -0
- data/docs/SaveCredit.md +26 -0
- data/docs/SaveDiscount.md +28 -0
- data/docs/SaveJournalEntrySplit.md +22 -0
- data/docs/SaveLease.md +50 -0
- data/docs/SaveLeaseJournalEntry.md +26 -0
- data/docs/SaveOwner.md +36 -0
- data/docs/SaveOwnerContribution.md +34 -0
- data/docs/SaveOwnerDraw.md +34 -0
- data/docs/SavePayment.md +34 -0
- data/docs/SavePortfolio.md +38 -0
- data/docs/SaveProspect.md +76 -0
- data/docs/SaveProspectContact.md +36 -0
- data/docs/SaveRefund.md +34 -0
- data/docs/SaveUnit.md +60 -0
- data/docs/SaveVendor.md +46 -0
- data/docs/SaveWorkOrder.md +36 -0
- data/docs/SaveWorkOrderTask.md +30 -0
- data/docs/SplitPaid.md +34 -0
- data/docs/SplitPay.md +20 -0
- data/docs/Task.md +42 -0
- data/docs/Transaction.md +54 -0
- data/docs/Unit.md +96 -0
- data/docs/UnitsApi.md +875 -0
- data/docs/UpdateLeaseJournalEntry.md +26 -0
- data/docs/Vendor.md +76 -0
- data/docs/VendorsApi.md +617 -0
- data/docs/WorkOrder.md +78 -0
- data/docs/WorkOrdersApi.md +883 -0
- data/lib/propertyware/api/accounting_api.rb +1041 -0
- data/lib/propertyware/api/bills_api.rb +1182 -0
- data/lib/propertyware/api/buildings_api.rb +863 -0
- data/lib/propertyware/api/contacts_api.rb +666 -0
- data/lib/propertyware/api/documents_api.rb +235 -0
- data/lib/propertyware/api/health_check_api.rb +79 -0
- data/lib/propertyware/api/inspections_api.rb +172 -0
- data/lib/propertyware/api/leases_api.rb +2787 -0
- data/lib/propertyware/api/portfolios_api.rb +599 -0
- data/lib/propertyware/api/prospects_api.rb +671 -0
- data/lib/propertyware/api/units_api.rb +740 -0
- data/lib/propertyware/api/vendors_api.rb +522 -0
- data/lib/propertyware/api/work_orders_api.rb +763 -0
- data/lib/propertyware/api_client.rb +428 -0
- data/lib/propertyware/api_error.rb +58 -0
- data/lib/propertyware/configuration.rb +392 -0
- data/lib/propertyware/models/account.rb +549 -0
- data/lib/propertyware/models/address.rb +269 -0
- data/lib/propertyware/models/amenity.rb +249 -0
- data/lib/propertyware/models/auto_journal_entry.rb +358 -0
- data/lib/propertyware/models/auto_payment.rb +338 -0
- data/lib/propertyware/models/bank.rb +389 -0
- data/lib/propertyware/models/bank_deposit.rb +289 -0
- data/lib/propertyware/models/basic_vendor.rb +330 -0
- data/lib/propertyware/models/bill.rb +401 -0
- data/lib/propertyware/models/bill_paid.rb +250 -0
- data/lib/propertyware/models/bill_pay.rb +230 -0
- data/lib/propertyware/models/bill_payment.rb +361 -0
- data/lib/propertyware/models/bill_split.rb +339 -0
- data/lib/propertyware/models/building.rb +782 -0
- data/lib/propertyware/models/campaign.rb +430 -0
- data/lib/propertyware/models/campaign_source.rb +258 -0
- data/lib/propertyware/models/charge.rb +318 -0
- data/lib/propertyware/models/charge_tx.rb +401 -0
- data/lib/propertyware/models/check.rb +425 -0
- data/lib/propertyware/models/check_split.rb +284 -0
- data/lib/propertyware/models/comment.rb +269 -0
- data/lib/propertyware/models/contact.rb +546 -0
- data/lib/propertyware/models/conversation.rb +345 -0
- data/lib/propertyware/models/credit_card_account.rb +219 -0
- data/lib/propertyware/models/current_asset.rb +279 -0
- data/lib/propertyware/models/current_liability.rb +279 -0
- data/lib/propertyware/models/custom_field.rb +249 -0
- data/lib/propertyware/models/discount.rb +339 -0
- data/lib/propertyware/models/document.rb +362 -0
- data/lib/propertyware/models/entry.rb +297 -0
- data/lib/propertyware/models/equity.rb +289 -0
- data/lib/propertyware/models/error_response.rb +237 -0
- data/lib/propertyware/models/expense.rb +289 -0
- data/lib/propertyware/models/gl_item.rb +330 -0
- data/lib/propertyware/models/income.rb +299 -0
- data/lib/propertyware/models/inspection.rb +361 -0
- data/lib/propertyware/models/inspection_area.rb +241 -0
- data/lib/propertyware/models/inspection_item.rb +249 -0
- data/lib/propertyware/models/journal_entry.rb +311 -0
- data/lib/propertyware/models/journal_entry_split.rb +264 -0
- data/lib/propertyware/models/journal_entry_split_response.rb +263 -0
- data/lib/propertyware/models/late_fee_rule.rb +258 -0
- data/lib/propertyware/models/lease.rb +515 -0
- data/lib/propertyware/models/lease_clause.rb +238 -0
- data/lib/propertyware/models/lease_contact.rb +309 -0
- data/lib/propertyware/models/management_fee.rb +279 -0
- data/lib/propertyware/models/management_settings.rb +261 -0
- data/lib/propertyware/models/marketing.rb +439 -0
- data/lib/propertyware/models/non_current_asset.rb +259 -0
- data/lib/propertyware/models/non_current_liability.rb +279 -0
- data/lib/propertyware/models/non_operating_expense.rb +289 -0
- data/lib/propertyware/models/non_operating_inome.rb +289 -0
- data/lib/propertyware/models/note.rb +267 -0
- data/lib/propertyware/models/owner.rb +318 -0
- data/lib/propertyware/models/owner_contribution.rb +418 -0
- data/lib/propertyware/models/owner_draw.rb +398 -0
- data/lib/propertyware/models/payment.rb +423 -0
- data/lib/propertyware/models/payment_charge.rb +358 -0
- data/lib/propertyware/models/portfolio.rb +479 -0
- data/lib/propertyware/models/property_manager.rb +259 -0
- data/lib/propertyware/models/prospect.rb +701 -0
- data/lib/propertyware/models/refund.rb +384 -0
- data/lib/propertyware/models/response_entity.rb +260 -0
- data/lib/propertyware/models/restapi_bulk_error_response.rb +237 -0
- data/lib/propertyware/models/restapi_bulk_success_response.rb +217 -0
- data/lib/propertyware/models/restapi_error.rb +226 -0
- data/lib/propertyware/models/save_account.rb +398 -0
- data/lib/propertyware/models/save_address.rb +274 -0
- data/lib/propertyware/models/save_adjustment.rb +269 -0
- data/lib/propertyware/models/save_auto_charge.rb +328 -0
- data/lib/propertyware/models/save_bank_deposit.rb +239 -0
- data/lib/propertyware/models/save_bill.rb +356 -0
- data/lib/propertyware/models/save_bill_payment.rb +314 -0
- data/lib/propertyware/models/save_bill_split.rb +319 -0
- data/lib/propertyware/models/save_building.rb +653 -0
- data/lib/propertyware/models/save_charge.rb +289 -0
- data/lib/propertyware/models/save_check.rb +291 -0
- data/lib/propertyware/models/save_check_split.rb +289 -0
- data/lib/propertyware/models/save_comment.rb +224 -0
- data/lib/propertyware/models/save_contact.rb +472 -0
- data/lib/propertyware/models/save_conversation.rb +273 -0
- data/lib/propertyware/models/save_credit.rb +271 -0
- data/lib/propertyware/models/save_discount.rb +289 -0
- data/lib/propertyware/models/save_journal_entry_split.rb +254 -0
- data/lib/propertyware/models/save_lease.rb +444 -0
- data/lib/propertyware/models/save_lease_journal_entry.rb +276 -0
- data/lib/propertyware/models/save_owner.rb +318 -0
- data/lib/propertyware/models/save_owner_contribution.rb +373 -0
- data/lib/propertyware/models/save_owner_draw.rb +334 -0
- data/lib/propertyware/models/save_payment.rb +373 -0
- data/lib/propertyware/models/save_portfolio.rb +379 -0
- data/lib/propertyware/models/save_prospect.rb +511 -0
- data/lib/propertyware/models/save_prospect_contact.rb +318 -0
- data/lib/propertyware/models/save_refund.rb +334 -0
- data/lib/propertyware/models/save_unit.rb +492 -0
- data/lib/propertyware/models/save_vendor.rb +379 -0
- data/lib/propertyware/models/save_work_order.rb +345 -0
- data/lib/propertyware/models/save_work_order_task.rb +284 -0
- data/lib/propertyware/models/split_paid.rb +298 -0
- data/lib/propertyware/models/split_pay.rb +228 -0
- data/lib/propertyware/models/task.rb +339 -0
- data/lib/propertyware/models/transaction.rb +433 -0
- data/lib/propertyware/models/unit.rb +670 -0
- data/lib/propertyware/models/update_lease_journal_entry.rb +276 -0
- data/lib/propertyware/models/vendor.rb +511 -0
- data/lib/propertyware/models/work_order.rb +557 -0
- data/lib/propertyware/version.rb +15 -0
- data/lib/propertyware.rb +158 -0
- data/openapitools.json +7 -0
- data/propertyware.gemspec +39 -0
- data/spec/api/accounting_api_spec.rb +239 -0
- data/spec/api/bills_api_spec.rb +260 -0
- data/spec/api/buildings_api_spec.rb +199 -0
- data/spec/api/contacts_api_spec.rb +159 -0
- data/spec/api/documents_api_spec.rb +77 -0
- data/spec/api/health_check_api_spec.rb +46 -0
- data/spec/api/inspections_api_spec.rb +68 -0
- data/spec/api/leases_api_spec.rb +579 -0
- data/spec/api/portfolios_api_spec.rb +147 -0
- data/spec/api/prospects_api_spec.rb +162 -0
- data/spec/api/units_api_spec.rb +176 -0
- data/spec/api/vendors_api_spec.rb +134 -0
- data/spec/api/work_orders_api_spec.rb +180 -0
- data/spec/api_client_spec.rb +223 -0
- data/spec/configuration_spec.rb +82 -0
- data/spec/models/account_spec.rb +232 -0
- data/spec/models/address_spec.rb +64 -0
- data/spec/models/amenity_spec.rb +52 -0
- data/spec/models/auto_journal_entry_spec.rb +118 -0
- data/spec/models/auto_payment_spec.rb +106 -0
- data/spec/models/bank_deposit_spec.rb +76 -0
- data/spec/models/bank_spec.rb +136 -0
- data/spec/models/basic_vendor_spec.rb +100 -0
- data/spec/models/bill_paid_spec.rb +52 -0
- data/spec/models/bill_pay_spec.rb +40 -0
- data/spec/models/bill_payment_spec.rb +118 -0
- data/spec/models/bill_spec.rb +142 -0
- data/spec/models/bill_split_spec.rb +106 -0
- data/spec/models/building_spec.rb +344 -0
- data/spec/models/campaign_source_spec.rb +58 -0
- data/spec/models/campaign_spec.rb +160 -0
- data/spec/models/charge_spec.rb +88 -0
- data/spec/models/charge_tx_spec.rb +136 -0
- data/spec/models/check_spec.rb +128 -0
- data/spec/models/check_split_spec.rb +70 -0
- data/spec/models/comment_spec.rb +64 -0
- data/spec/models/contact_spec.rb +210 -0
- data/spec/models/conversation_spec.rb +92 -0
- data/spec/models/credit_card_account_spec.rb +34 -0
- data/spec/models/current_asset_spec.rb +70 -0
- data/spec/models/current_liability_spec.rb +70 -0
- data/spec/models/custom_field_spec.rb +52 -0
- data/spec/models/discount_spec.rb +100 -0
- data/spec/models/document_spec.rb +104 -0
- data/spec/models/entry_spec.rb +82 -0
- data/spec/models/equity_spec.rb +76 -0
- data/spec/models/error_response_spec.rb +46 -0
- data/spec/models/expense_spec.rb +76 -0
- data/spec/models/gl_item_spec.rb +100 -0
- data/spec/models/income_spec.rb +82 -0
- data/spec/models/inspection_area_spec.rb +46 -0
- data/spec/models/inspection_item_spec.rb +52 -0
- data/spec/models/inspection_spec.rb +118 -0
- data/spec/models/journal_entry_spec.rb +88 -0
- data/spec/models/journal_entry_split_response_spec.rb +52 -0
- data/spec/models/journal_entry_split_spec.rb +52 -0
- data/spec/models/late_fee_rule_spec.rb +58 -0
- data/spec/models/lease_clause_spec.rb +46 -0
- data/spec/models/lease_contact_spec.rb +88 -0
- data/spec/models/lease_spec.rb +208 -0
- data/spec/models/management_fee_spec.rb +70 -0
- data/spec/models/management_settings_spec.rb +58 -0
- data/spec/models/marketing_spec.rb +166 -0
- data/spec/models/non_current_asset_spec.rb +58 -0
- data/spec/models/non_current_liability_spec.rb +70 -0
- data/spec/models/non_operating_expense_spec.rb +76 -0
- data/spec/models/non_operating_inome_spec.rb +76 -0
- data/spec/models/note_spec.rb +64 -0
- data/spec/models/owner_contribution_spec.rb +116 -0
- data/spec/models/owner_draw_spec.rb +116 -0
- data/spec/models/owner_spec.rb +94 -0
- data/spec/models/payment_charge_spec.rb +92 -0
- data/spec/models/payment_spec.rb +134 -0
- data/spec/models/portfolio_spec.rb +168 -0
- data/spec/models/property_manager_spec.rb +58 -0
- data/spec/models/prospect_spec.rb +322 -0
- data/spec/models/refund_spec.rb +112 -0
- data/spec/models/response_entity_spec.rb +44 -0
- data/spec/models/restapi_bulk_error_response_spec.rb +46 -0
- data/spec/models/restapi_bulk_success_response_spec.rb +34 -0
- data/spec/models/restapi_error_spec.rb +40 -0
- data/spec/models/save_account_spec.rb +136 -0
- data/spec/models/save_address_spec.rb +64 -0
- data/spec/models/save_adjustment_spec.rb +58 -0
- data/spec/models/save_auto_charge_spec.rb +68 -0
- data/spec/models/save_bank_deposit_spec.rb +40 -0
- data/spec/models/save_bill_payment_spec.rb +74 -0
- data/spec/models/save_bill_spec.rb +106 -0
- data/spec/models/save_bill_split_spec.rb +88 -0
- data/spec/models/save_building_spec.rb +248 -0
- data/spec/models/save_charge_spec.rb +64 -0
- data/spec/models/save_check_spec.rb +70 -0
- data/spec/models/save_check_split_spec.rb +70 -0
- data/spec/models/save_comment_spec.rb +34 -0
- data/spec/models/save_contact_spec.rb +164 -0
- data/spec/models/save_conversation_spec.rb +44 -0
- data/spec/models/save_credit_spec.rb +58 -0
- data/spec/models/save_discount_spec.rb +64 -0
- data/spec/models/save_journal_entry_split_spec.rb +46 -0
- data/spec/models/save_lease_journal_entry_spec.rb +58 -0
- data/spec/models/save_lease_spec.rb +134 -0
- data/spec/models/save_owner_contribution_spec.rb +86 -0
- data/spec/models/save_owner_draw_spec.rb +82 -0
- data/spec/models/save_owner_spec.rb +88 -0
- data/spec/models/save_payment_spec.rb +86 -0
- data/spec/models/save_portfolio_spec.rb +102 -0
- data/spec/models/save_prospect_contact_spec.rb +88 -0
- data/spec/models/save_prospect_spec.rb +208 -0
- data/spec/models/save_refund_spec.rb +82 -0
- data/spec/models/save_unit_spec.rb +164 -0
- data/spec/models/save_vendor_spec.rb +118 -0
- data/spec/models/save_work_order_spec.rb +92 -0
- data/spec/models/save_work_order_task_spec.rb +70 -0
- data/spec/models/split_paid_spec.rb +82 -0
- data/spec/models/split_pay_spec.rb +40 -0
- data/spec/models/task_spec.rb +106 -0
- data/spec/models/transaction_spec.rb +146 -0
- data/spec/models/unit_spec.rb +280 -0
- data/spec/models/update_lease_journal_entry_spec.rb +58 -0
- data/spec/models/vendor_spec.rb +208 -0
- data/spec/models/work_order_spec.rb +218 -0
- data/spec/spec_helper.rb +111 -0
- metadata +609 -0
@@ -0,0 +1,371 @@
|
|
1
|
+
{{#description}}
|
2
|
+
# {{{.}}}
|
3
|
+
{{/description}}
|
4
|
+
class {{classname}}{{#parent}} < {{{.}}}{{/parent}}
|
5
|
+
{{#vars}}
|
6
|
+
{{#description}}
|
7
|
+
# {{{.}}}
|
8
|
+
{{/description}}
|
9
|
+
attr_accessor :{{{name}}}
|
10
|
+
|
11
|
+
{{/vars}}
|
12
|
+
{{#hasEnums}}
|
13
|
+
class EnumAttributeValidator
|
14
|
+
attr_reader :datatype
|
15
|
+
attr_reader :allowable_values
|
16
|
+
|
17
|
+
def initialize(datatype, allowable_values)
|
18
|
+
@allowable_values = allowable_values.map do |value|
|
19
|
+
case datatype.to_s
|
20
|
+
when /Integer/i
|
21
|
+
value.to_i
|
22
|
+
when /Float/i
|
23
|
+
value.to_f
|
24
|
+
else
|
25
|
+
value
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def valid?(value)
|
31
|
+
!value || allowable_values.include?(value)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
{{/hasEnums}}
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
37
|
+
def self.attribute_map
|
38
|
+
{
|
39
|
+
{{#vars}}
|
40
|
+
:'{{{name}}}' => :'{{{baseName}}}'{{^-last}},{{/-last}}
|
41
|
+
{{/vars}}
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Returns all the JSON keys this model knows about{{#parent}}, including the ones defined in its parent(s){{/parent}}
|
46
|
+
def self.acceptable_attributes
|
47
|
+
{{^parent}}
|
48
|
+
attribute_map.values
|
49
|
+
{{/parent}}
|
50
|
+
{{#parent}}
|
51
|
+
attribute_map.values.concat(superclass.acceptable_attributes)
|
52
|
+
{{/parent}}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Attribute type mapping.
|
56
|
+
def self.openapi_types
|
57
|
+
{
|
58
|
+
{{#vars}}
|
59
|
+
:'{{{name}}}' => :'{{{dataType}}}'{{^-last}},{{/-last}}
|
60
|
+
{{/vars}}
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# List of attributes with nullable: true
|
65
|
+
def self.openapi_nullable
|
66
|
+
Set.new([
|
67
|
+
{{#vars}}
|
68
|
+
{{#isNullable}}
|
69
|
+
:'{{{name}}}'{{^-last}},{{/-last}}
|
70
|
+
{{/isNullable}}
|
71
|
+
{{/vars}}
|
72
|
+
])
|
73
|
+
end
|
74
|
+
|
75
|
+
{{#anyOf}}
|
76
|
+
{{#-first}}
|
77
|
+
# List of class defined in anyOf (OpenAPI v3)
|
78
|
+
def self.openapi_any_of
|
79
|
+
[
|
80
|
+
{{/-first}}
|
81
|
+
:'{{{.}}}'{{^-last}},{{/-last}}
|
82
|
+
{{#-last}}
|
83
|
+
]
|
84
|
+
end
|
85
|
+
|
86
|
+
{{/-last}}
|
87
|
+
{{/anyOf}}
|
88
|
+
{{#allOf}}
|
89
|
+
{{#-first}}
|
90
|
+
# List of class defined in allOf (OpenAPI v3)
|
91
|
+
def self.openapi_all_of
|
92
|
+
[
|
93
|
+
{{/-first}}
|
94
|
+
:'{{{.}}}'{{^-last}},{{/-last}}
|
95
|
+
{{#-last}}
|
96
|
+
]
|
97
|
+
end
|
98
|
+
|
99
|
+
{{/-last}}
|
100
|
+
{{/allOf}}
|
101
|
+
{{#discriminator}}
|
102
|
+
{{#propertyName}}
|
103
|
+
# discriminator's property name in OpenAPI v3
|
104
|
+
def self.openapi_discriminator_name
|
105
|
+
:'{{{.}}}'
|
106
|
+
end
|
107
|
+
|
108
|
+
{{/propertyName}}
|
109
|
+
{{/discriminator}}
|
110
|
+
# Initializes the object
|
111
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
112
|
+
def initialize(attributes = {})
|
113
|
+
if (!attributes.is_a?(Hash))
|
114
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `{{{moduleName}}}::{{{classname}}}` initialize method"
|
115
|
+
end
|
116
|
+
|
117
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
118
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
119
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
120
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `{{{moduleName}}}::{{{classname}}}`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
121
|
+
end
|
122
|
+
h[k.to_sym] = v
|
123
|
+
}
|
124
|
+
{{#parent}}
|
125
|
+
|
126
|
+
# call parent's initialize
|
127
|
+
super(attributes)
|
128
|
+
{{/parent}}
|
129
|
+
{{#vars}}
|
130
|
+
|
131
|
+
if attributes.key?(:'{{{name}}}')
|
132
|
+
{{#isArray}}
|
133
|
+
if (value = attributes[:'{{{name}}}']).is_a?(Array)
|
134
|
+
self.{{{name}}} = value
|
135
|
+
end
|
136
|
+
{{/isArray}}
|
137
|
+
{{#isMap}}
|
138
|
+
if (value = attributes[:'{{{name}}}']).is_a?(Hash)
|
139
|
+
self.{{{name}}} = value
|
140
|
+
end
|
141
|
+
{{/isMap}}
|
142
|
+
{{^isContainer}}
|
143
|
+
self.{{{name}}} = attributes[:'{{{name}}}']
|
144
|
+
{{/isContainer}}
|
145
|
+
{{#defaultValue}}
|
146
|
+
else
|
147
|
+
self.{{{name}}} = {{{defaultValue}}}
|
148
|
+
{{/defaultValue}}
|
149
|
+
end
|
150
|
+
{{/vars}}
|
151
|
+
end
|
152
|
+
|
153
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
154
|
+
# @return Array for valid properties with the reasons
|
155
|
+
def list_invalid_properties
|
156
|
+
invalid_properties = {{^parent}}Array.new{{/parent}}{{#parent}}super{{/parent}}
|
157
|
+
{{#vars}}
|
158
|
+
{{^isNullable}}
|
159
|
+
{{#required}}
|
160
|
+
if @{{{name}}}.nil?
|
161
|
+
invalid_properties.push('invalid value for "{{{name}}}", {{{name}}} cannot be nil.')
|
162
|
+
end
|
163
|
+
|
164
|
+
{{/required}}
|
165
|
+
{{/isNullable}}
|
166
|
+
{{#hasValidation}}
|
167
|
+
{{#maxLength}}
|
168
|
+
if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}}.to_s.length > {{{maxLength}}}
|
169
|
+
invalid_properties.push('invalid value for "{{{name}}}", the character length must be smaller than or equal to {{{maxLength}}}.')
|
170
|
+
end
|
171
|
+
|
172
|
+
{{/maxLength}}
|
173
|
+
{{#minLength}}
|
174
|
+
if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}}.to_s.length < {{{minLength}}}
|
175
|
+
invalid_properties.push('invalid value for "{{{name}}}", the character length must be great than or equal to {{{minLength}}}.')
|
176
|
+
end
|
177
|
+
|
178
|
+
{{/minLength}}
|
179
|
+
{{#maximum}}
|
180
|
+
if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}} >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{{maximum}}}
|
181
|
+
invalid_properties.push('invalid value for "{{{name}}}", must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{{maximum}}}.')
|
182
|
+
end
|
183
|
+
|
184
|
+
{{/maximum}}
|
185
|
+
{{#minimum}}
|
186
|
+
if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}} <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{{minimum}}}
|
187
|
+
invalid_properties.push('invalid value for "{{{name}}}", must be greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{{minimum}}}.')
|
188
|
+
end
|
189
|
+
|
190
|
+
{{/minimum}}
|
191
|
+
{{#pattern}}
|
192
|
+
pattern = Regexp.new({{{pattern}}})
|
193
|
+
if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}} !~ pattern
|
194
|
+
invalid_properties.push("invalid value for \"{{{name}}}\", must conform to the pattern #{pattern}.")
|
195
|
+
end
|
196
|
+
|
197
|
+
{{/pattern}}
|
198
|
+
{{#maxItems}}
|
199
|
+
if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}}.length > {{{maxItems}}}
|
200
|
+
invalid_properties.push('invalid value for "{{{name}}}", number of items must be less than or equal to {{{maxItems}}}.')
|
201
|
+
end
|
202
|
+
|
203
|
+
{{/maxItems}}
|
204
|
+
{{#minItems}}
|
205
|
+
if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}}.length < {{{minItems}}}
|
206
|
+
invalid_properties.push('invalid value for "{{{name}}}", number of items must be greater than or equal to {{{minItems}}}.')
|
207
|
+
end
|
208
|
+
|
209
|
+
{{/minItems}}
|
210
|
+
{{/hasValidation}}
|
211
|
+
{{/vars}}
|
212
|
+
invalid_properties
|
213
|
+
end
|
214
|
+
|
215
|
+
# Check to see if the all the properties in the model are valid
|
216
|
+
# @return true if the model is valid
|
217
|
+
def valid?
|
218
|
+
{{#vars}}
|
219
|
+
{{^isNullable}}
|
220
|
+
{{#required}}
|
221
|
+
return false if @{{{name}}}.nil?
|
222
|
+
{{/required}}
|
223
|
+
{{/isNullable}}
|
224
|
+
{{#isEnum}}
|
225
|
+
{{^isContainer}}
|
226
|
+
{{{name}}}_validator = EnumAttributeValidator.new('{{{dataType}}}', [{{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}}])
|
227
|
+
return false unless {{{name}}}_validator.valid?(@{{{name}}})
|
228
|
+
{{/isContainer}}
|
229
|
+
{{/isEnum}}
|
230
|
+
{{#hasValidation}}
|
231
|
+
{{#maxLength}}
|
232
|
+
return false if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}}.to_s.length > {{{maxLength}}}
|
233
|
+
{{/maxLength}}
|
234
|
+
{{#minLength}}
|
235
|
+
return false if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}}.to_s.length < {{{minLength}}}
|
236
|
+
{{/minLength}}
|
237
|
+
{{#maximum}}
|
238
|
+
return false if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}} >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{{maximum}}}
|
239
|
+
{{/maximum}}
|
240
|
+
{{#minimum}}
|
241
|
+
return false if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}} <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{{minimum}}}
|
242
|
+
{{/minimum}}
|
243
|
+
{{#pattern}}
|
244
|
+
return false if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}} !~ Regexp.new({{{pattern}}})
|
245
|
+
{{/pattern}}
|
246
|
+
{{#maxItems}}
|
247
|
+
return false if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}}.length > {{{maxItems}}}
|
248
|
+
{{/maxItems}}
|
249
|
+
{{#minItems}}
|
250
|
+
return false if {{^required}}!@{{{name}}}.nil? && {{/required}}@{{{name}}}.length < {{{minItems}}}
|
251
|
+
{{/minItems}}
|
252
|
+
{{/hasValidation}}
|
253
|
+
{{/vars}}
|
254
|
+
{{#anyOf}}
|
255
|
+
{{#-first}}
|
256
|
+
_any_of_found = false
|
257
|
+
self.class.openapi_any_of.each do |_class|
|
258
|
+
_any_of = {{moduleName}}.const_get(_class).build_from_hash(self.to_hash)
|
259
|
+
if _any_of.valid?
|
260
|
+
_any_of_found = true
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
if !_any_of_found
|
265
|
+
return false
|
266
|
+
end
|
267
|
+
|
268
|
+
{{/-first}}
|
269
|
+
{{/anyOf}}
|
270
|
+
true{{#parent}} && super{{/parent}}
|
271
|
+
end
|
272
|
+
|
273
|
+
{{#vars}}
|
274
|
+
{{#isEnum}}
|
275
|
+
{{^isContainer}}
|
276
|
+
# Custom attribute writer method checking allowed values (enum).
|
277
|
+
# @param [Object] {{{name}}} Object to be assigned
|
278
|
+
def {{{name}}}=({{{name}}})
|
279
|
+
validator = EnumAttributeValidator.new('{{{dataType}}}', [{{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}}])
|
280
|
+
unless validator.valid?({{{name}}})
|
281
|
+
fail ArgumentError, "invalid value #{ {{{name}}}.inspect } for \"{{{name}}}\", must be one of #{validator.allowable_values}."
|
282
|
+
end
|
283
|
+
@{{{name}}} = {{{name}}}
|
284
|
+
end
|
285
|
+
|
286
|
+
{{/isContainer}}
|
287
|
+
{{/isEnum}}
|
288
|
+
{{^isEnum}}
|
289
|
+
{{#hasValidation}}
|
290
|
+
# Custom attribute writer method with validation
|
291
|
+
# @param [Object] {{{name}}} Value to be assigned
|
292
|
+
def {{{name}}}=({{{name}}})
|
293
|
+
{{^isNullable}}
|
294
|
+
{{#required}}
|
295
|
+
if {{{name}}}.nil?
|
296
|
+
fail ArgumentError, '{{{name}}} cannot be nil'
|
297
|
+
end
|
298
|
+
|
299
|
+
{{/required}}
|
300
|
+
{{/isNullable}}
|
301
|
+
{{#maxLength}}
|
302
|
+
if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}}.to_s.length > {{{maxLength}}}
|
303
|
+
fail ArgumentError, 'invalid value for "{{{name}}}", the character length must be smaller than or equal to {{{maxLength}}}.'
|
304
|
+
end
|
305
|
+
|
306
|
+
{{/maxLength}}
|
307
|
+
{{#minLength}}
|
308
|
+
if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}}.to_s.length < {{{minLength}}}
|
309
|
+
fail ArgumentError, 'invalid value for "{{{name}}}", the character length must be great than or equal to {{{minLength}}}.'
|
310
|
+
end
|
311
|
+
|
312
|
+
{{/minLength}}
|
313
|
+
{{#maximum}}
|
314
|
+
if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}} >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{{maximum}}}
|
315
|
+
fail ArgumentError, 'invalid value for "{{{name}}}", must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{{maximum}}}.'
|
316
|
+
end
|
317
|
+
|
318
|
+
{{/maximum}}
|
319
|
+
{{#minimum}}
|
320
|
+
if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}} <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{{minimum}}}
|
321
|
+
fail ArgumentError, 'invalid value for "{{{name}}}", must be greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{{minimum}}}.'
|
322
|
+
end
|
323
|
+
|
324
|
+
{{/minimum}}
|
325
|
+
{{#pattern}}
|
326
|
+
pattern = Regexp.new({{{pattern}}})
|
327
|
+
if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}} !~ pattern
|
328
|
+
fail ArgumentError, "invalid value for \"{{{name}}}\", must conform to the pattern #{pattern}."
|
329
|
+
end
|
330
|
+
|
331
|
+
{{/pattern}}
|
332
|
+
{{#maxItems}}
|
333
|
+
if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}}.length > {{{maxItems}}}
|
334
|
+
fail ArgumentError, 'invalid value for "{{{name}}}", number of items must be less than or equal to {{{maxItems}}}.'
|
335
|
+
end
|
336
|
+
|
337
|
+
{{/maxItems}}
|
338
|
+
{{#minItems}}
|
339
|
+
if {{^required}}!{{{name}}}.nil? && {{/required}}{{{name}}}.length < {{{minItems}}}
|
340
|
+
fail ArgumentError, 'invalid value for "{{{name}}}", number of items must be greater than or equal to {{{minItems}}}.'
|
341
|
+
end
|
342
|
+
|
343
|
+
{{/minItems}}
|
344
|
+
@{{{name}}} = {{{name}}}
|
345
|
+
end
|
346
|
+
|
347
|
+
{{/hasValidation}}
|
348
|
+
{{/isEnum}}
|
349
|
+
{{/vars}}
|
350
|
+
# Checks equality by comparing each attribute.
|
351
|
+
# @param [Object] Object to be compared
|
352
|
+
def ==(o)
|
353
|
+
return true if self.equal?(o)
|
354
|
+
self.class == o.class{{#vars}} &&
|
355
|
+
{{name}} == o.{{name}}{{/vars}}{{#parent}} && super(o){{/parent}}
|
356
|
+
end
|
357
|
+
|
358
|
+
# @see the `==` method
|
359
|
+
# @param [Object] Object to be compared
|
360
|
+
def eql?(o)
|
361
|
+
self == o
|
362
|
+
end
|
363
|
+
|
364
|
+
# Calculates hash code according to all attributes.
|
365
|
+
# @return [Integer] Hash code
|
366
|
+
def hash
|
367
|
+
[{{#vars}}{{name}}{{^-last}}, {{/-last}}{{/vars}}].hash
|
368
|
+
end
|
369
|
+
|
370
|
+
{{> base_object}}
|
371
|
+
end
|
@@ -0,0 +1,124 @@
|
|
1
|
+
# This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license)
|
2
|
+
# Automatically generated by OpenAPI Generator (https://openapi-generator.tech)
|
3
|
+
# If you want to update these configurations,
|
4
|
+
# change it on `.openapi-generator/templates/ruby-client/rubocop.mustache` instead
|
5
|
+
AllCops:
|
6
|
+
TargetRubyVersion: 2.6.6
|
7
|
+
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
|
8
|
+
# to ignore them, so only the ones explicitly set in this file are enabled.
|
9
|
+
DisabledByDefault: true
|
10
|
+
Exclude:
|
11
|
+
- "**/templates/**/*"
|
12
|
+
- "**/vendor/**/*"
|
13
|
+
- "actionpack/lib/action_dispatch/journey/parser.rb"
|
14
|
+
|
15
|
+
# Prefer &&/|| over and/or.
|
16
|
+
Style/AndOr:
|
17
|
+
Enabled: true
|
18
|
+
|
19
|
+
Style/FormatStringToken:
|
20
|
+
EnforcedStyle: template
|
21
|
+
|
22
|
+
Style/Lambda:
|
23
|
+
EnforcedStyle: literal
|
24
|
+
|
25
|
+
Style/RegexpLiteral:
|
26
|
+
AllowInnerSlashes: true
|
27
|
+
|
28
|
+
Style/ReturnNil:
|
29
|
+
Enabled: true
|
30
|
+
|
31
|
+
# Align `when` with `case`.
|
32
|
+
Layout/CaseIndentation:
|
33
|
+
Enabled: true
|
34
|
+
|
35
|
+
# Align comments with method definitions.
|
36
|
+
Layout/CommentIndentation:
|
37
|
+
Enabled: true
|
38
|
+
|
39
|
+
Layout/ElseAlignment:
|
40
|
+
Enabled: true
|
41
|
+
|
42
|
+
Layout/EmptyLineAfterMagicComment:
|
43
|
+
Enabled: true
|
44
|
+
|
45
|
+
# In a regular class definition, no empty lines around the body.
|
46
|
+
Layout/EmptyLinesAroundClassBody:
|
47
|
+
Enabled: true
|
48
|
+
|
49
|
+
# In a regular method definition, no empty lines around the body.
|
50
|
+
Layout/EmptyLinesAroundMethodBody:
|
51
|
+
Enabled: true
|
52
|
+
|
53
|
+
# In a regular module definition, no empty lines around the body.
|
54
|
+
Layout/EmptyLinesAroundModuleBody:
|
55
|
+
Enabled: true
|
56
|
+
|
57
|
+
# Two spaces, no tabs (for indentation).
|
58
|
+
Layout/IndentationWidth:
|
59
|
+
Enabled: true
|
60
|
+
|
61
|
+
Layout/LeadingCommentSpace:
|
62
|
+
Enabled: true
|
63
|
+
|
64
|
+
Layout/SpaceAfterColon:
|
65
|
+
Enabled: true
|
66
|
+
|
67
|
+
Layout/SpaceAfterComma:
|
68
|
+
Enabled: true
|
69
|
+
|
70
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
71
|
+
Enabled: true
|
72
|
+
|
73
|
+
Layout/SpaceAroundKeyword:
|
74
|
+
Enabled: true
|
75
|
+
|
76
|
+
Layout/SpaceAroundOperators:
|
77
|
+
Enabled: true
|
78
|
+
|
79
|
+
Layout/SpaceBeforeComma:
|
80
|
+
Enabled: true
|
81
|
+
|
82
|
+
Layout/SpaceBeforeFirstArg:
|
83
|
+
Enabled: true
|
84
|
+
|
85
|
+
Style/DefWithParentheses:
|
86
|
+
Enabled: true
|
87
|
+
|
88
|
+
# Defining a method with parameters needs parentheses.
|
89
|
+
Style/MethodDefParentheses:
|
90
|
+
Enabled: true
|
91
|
+
|
92
|
+
# Use `foo {}` not `foo{}`.
|
93
|
+
Layout/SpaceBeforeBlockBraces:
|
94
|
+
Enabled: true
|
95
|
+
|
96
|
+
# Use `foo { bar }` not `foo {bar}`.
|
97
|
+
Layout/SpaceInsideBlockBraces:
|
98
|
+
Enabled: true
|
99
|
+
|
100
|
+
# Use `{ a: 1 }` not `{a:1}`.
|
101
|
+
Layout/SpaceInsideHashLiteralBraces:
|
102
|
+
Enabled: true
|
103
|
+
|
104
|
+
Layout/SpaceInsideParens:
|
105
|
+
Enabled: true
|
106
|
+
|
107
|
+
# Align `end` with the matching keyword or starting expression except for
|
108
|
+
# assignments, where it should be aligned with the LHS.
|
109
|
+
Layout/EndAlignment:
|
110
|
+
Enabled: true
|
111
|
+
EnforcedStyleAlignWith: variable
|
112
|
+
AutoCorrect: true
|
113
|
+
|
114
|
+
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
|
115
|
+
Lint/RequireParentheses:
|
116
|
+
Enabled: true
|
117
|
+
|
118
|
+
Style/RedundantReturn:
|
119
|
+
Enabled: true
|
120
|
+
AllowMultipleReturnValues: true
|
121
|
+
|
122
|
+
Style/Semicolon:
|
123
|
+
Enabled: true
|
124
|
+
AllowAsExpressionSeparator: true
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# OpenAPI Generator Ignore
|
2
|
+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
3
|
+
|
4
|
+
# Use this file to prevent files from being overwritten by the generator.
|
5
|
+
# The patterns follow closely to .gitignore or .dockerignore.
|
6
|
+
|
7
|
+
# As an example, the C# client generator defines ApiClient.cs.
|
8
|
+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
9
|
+
#ApiClient.cs
|
10
|
+
|
11
|
+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
12
|
+
#foo/*/qux
|
13
|
+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
14
|
+
|
15
|
+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
16
|
+
#foo/**/qux
|
17
|
+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
18
|
+
|
19
|
+
# You can also negate patterns with an exclamation (!).
|
20
|
+
# For example, you can ignore all files in a docs folder with the file extension .md:
|
21
|
+
#docs/*.md
|
22
|
+
# Then explicitly reverse the ignore rule for a single file:
|
23
|
+
#!docs/README.md
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,124 @@
|
|
1
|
+
# This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license)
|
2
|
+
# Automatically generated by OpenAPI Generator (https://openapi-generator.tech)
|
3
|
+
# If you want to update these configurations,
|
4
|
+
# change it on `.openapi-generator/templates/ruby-client/rubocop.mustache` instead
|
5
|
+
AllCops:
|
6
|
+
TargetRubyVersion: 2.6.6
|
7
|
+
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
|
8
|
+
# to ignore them, so only the ones explicitly set in this file are enabled.
|
9
|
+
DisabledByDefault: true
|
10
|
+
Exclude:
|
11
|
+
- "**/templates/**/*"
|
12
|
+
- "**/vendor/**/*"
|
13
|
+
- "actionpack/lib/action_dispatch/journey/parser.rb"
|
14
|
+
|
15
|
+
# Prefer &&/|| over and/or.
|
16
|
+
Style/AndOr:
|
17
|
+
Enabled: true
|
18
|
+
|
19
|
+
Style/FormatStringToken:
|
20
|
+
EnforcedStyle: template
|
21
|
+
|
22
|
+
Style/Lambda:
|
23
|
+
EnforcedStyle: literal
|
24
|
+
|
25
|
+
Style/RegexpLiteral:
|
26
|
+
AllowInnerSlashes: true
|
27
|
+
|
28
|
+
Style/ReturnNil:
|
29
|
+
Enabled: true
|
30
|
+
|
31
|
+
# Align `when` with `case`.
|
32
|
+
Layout/CaseIndentation:
|
33
|
+
Enabled: true
|
34
|
+
|
35
|
+
# Align comments with method definitions.
|
36
|
+
Layout/CommentIndentation:
|
37
|
+
Enabled: true
|
38
|
+
|
39
|
+
Layout/ElseAlignment:
|
40
|
+
Enabled: true
|
41
|
+
|
42
|
+
Layout/EmptyLineAfterMagicComment:
|
43
|
+
Enabled: true
|
44
|
+
|
45
|
+
# In a regular class definition, no empty lines around the body.
|
46
|
+
Layout/EmptyLinesAroundClassBody:
|
47
|
+
Enabled: true
|
48
|
+
|
49
|
+
# In a regular method definition, no empty lines around the body.
|
50
|
+
Layout/EmptyLinesAroundMethodBody:
|
51
|
+
Enabled: true
|
52
|
+
|
53
|
+
# In a regular module definition, no empty lines around the body.
|
54
|
+
Layout/EmptyLinesAroundModuleBody:
|
55
|
+
Enabled: true
|
56
|
+
|
57
|
+
# Two spaces, no tabs (for indentation).
|
58
|
+
Layout/IndentationWidth:
|
59
|
+
Enabled: true
|
60
|
+
|
61
|
+
Layout/LeadingCommentSpace:
|
62
|
+
Enabled: true
|
63
|
+
|
64
|
+
Layout/SpaceAfterColon:
|
65
|
+
Enabled: true
|
66
|
+
|
67
|
+
Layout/SpaceAfterComma:
|
68
|
+
Enabled: true
|
69
|
+
|
70
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
71
|
+
Enabled: true
|
72
|
+
|
73
|
+
Layout/SpaceAroundKeyword:
|
74
|
+
Enabled: true
|
75
|
+
|
76
|
+
Layout/SpaceAroundOperators:
|
77
|
+
Enabled: true
|
78
|
+
|
79
|
+
Layout/SpaceBeforeComma:
|
80
|
+
Enabled: true
|
81
|
+
|
82
|
+
Layout/SpaceBeforeFirstArg:
|
83
|
+
Enabled: true
|
84
|
+
|
85
|
+
Style/DefWithParentheses:
|
86
|
+
Enabled: true
|
87
|
+
|
88
|
+
# Defining a method with parameters needs parentheses.
|
89
|
+
Style/MethodDefParentheses:
|
90
|
+
Enabled: true
|
91
|
+
|
92
|
+
# Use `foo {}` not `foo{}`.
|
93
|
+
Layout/SpaceBeforeBlockBraces:
|
94
|
+
Enabled: true
|
95
|
+
|
96
|
+
# Use `foo { bar }` not `foo {bar}`.
|
97
|
+
Layout/SpaceInsideBlockBraces:
|
98
|
+
Enabled: true
|
99
|
+
|
100
|
+
# Use `{ a: 1 }` not `{a:1}`.
|
101
|
+
Layout/SpaceInsideHashLiteralBraces:
|
102
|
+
Enabled: true
|
103
|
+
|
104
|
+
Layout/SpaceInsideParens:
|
105
|
+
Enabled: true
|
106
|
+
|
107
|
+
# Align `end` with the matching keyword or starting expression except for
|
108
|
+
# assignments, where it should be aligned with the LHS.
|
109
|
+
Layout/EndAlignment:
|
110
|
+
Enabled: true
|
111
|
+
EnforcedStyleAlignWith: variable
|
112
|
+
AutoCorrect: true
|
113
|
+
|
114
|
+
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
|
115
|
+
Lint/RequireParentheses:
|
116
|
+
Enabled: true
|
117
|
+
|
118
|
+
Style/RedundantReturn:
|
119
|
+
Enabled: true
|
120
|
+
AllowMultipleReturnValues: true
|
121
|
+
|
122
|
+
Style/Semicolon:
|
123
|
+
Enabled: true
|
124
|
+
AllowAsExpressionSeparator: true
|
data/CUSTOMIZATIONS.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# Customizations
|
2
|
+
|
3
|
+
To satisfy our needs, we sometimes update some of OpenAPI Generator templates. This is a list of all of them, and the version where they were introduced.
|
4
|
+
|
5
|
+
These customizations reside in the `.openapi-generator/templates/ruby-client` folder.
|
6
|
+
|
7
|
+
## Changelog
|
8
|
+
|
9
|
+
### v1.0.0
|
10
|
+
|
11
|
+
- In case we receive an enum with an invalid value, we are adding the received value in the error message to make debugging (and further contacting Propertyware) easier. Update done, at the time of this commit, at `./.openapi-generator/templates/ruby-client/partial_model_generic.mustache:L281`.
|