Conversation
e067be0 to
459a04e
Compare
Collaborator
Author
|
Now the CI correctly fails due to either a bug or a recursive type (investigating now) |
459a04e to
2718252
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
1 similar comment
diff --ignore-all-space --minimal --new-file --recursive main/cli/generated/Bug10398/Api.elm branch/cli/generated/Bug10398/Api.elm
0a1,97
> module Bug10398.Api exposing (getPlanet, getPlanetTask, getPlanets, getPlanetsTask)
>
> {-|
>
>
> ## swapi
>
> @docs getPlanet, getPlanetTask, getPlanets, getPlanetsTask
>
> -}
>
> import Bug10398.Json
> import Bug10398.Types
> import Dict
> import Http
> import Json.Decode
> import OpenApi.Common
> import Task
> import Url.Builder
>
>
> getPlanet :
> { toMsg :
> Result (OpenApi.Common.Error e String) Bug10398.Types.Planet -> msg
> , params : { planetId : Int }
> }
> -> Cmd msg
> getPlanet config =
> Http.request
> { url =
> Url.Builder.crossOrigin
> "https://swapi.dev/api"
> [ "planets", String.fromInt config.params.planetId ]
> []
> , method = "GET"
> , headers = []
> , expect =
> OpenApi.Common.expectJsonCustom
> (Dict.fromList [])
> Bug10398.Json.decodePlanet
> config.toMsg
> , body = Http.emptyBody
> , timeout = Nothing
> , tracker = Nothing
> }
>
>
> getPlanetTask :
> { params : { planetId : Int } }
> -> Task.Task (OpenApi.Common.Error e String) Bug10398.Types.Planet
> getPlanetTask config =
> Http.task
> { url =
> Url.Builder.crossOrigin
> "https://swapi.dev/api"
> [ "planets", String.fromInt config.params.planetId ]
> []
> , method = "GET"
> , headers = []
> , resolver =
> OpenApi.Common.jsonResolverCustom
> (Dict.fromList [])
> Bug10398.Json.decodePlanet
> , body = Http.emptyBody
> , timeout = Nothing
> }
>
>
> getPlanets config =
> Http.request
> { url = Url.Builder.crossOrigin "https://swapi.dev/api" [ "planets" ] []
> , method = "GET"
> , headers = []
> , expect =
> OpenApi.Common.expectJsonCustom
> (Dict.fromList [])
> Bug10398.Json.decodePlanetList
> config.toMsg
> , body = Http.emptyBody
> , timeout = Nothing
> , tracker = Nothing
> }
>
>
> getPlanetsTask : {} -> Task.Task (OpenApi.Common.Error e String) Bug10398.Types.PlanetList
> getPlanetsTask config =
> Http.task
> { url = Url.Builder.crossOrigin "https://swapi.dev/api" [ "planets" ] []
> , method = "GET"
> , headers = []
> , resolver =
> OpenApi.Common.jsonResolverCustom
> (Dict.fromList [])
> Bug10398.Json.decodePlanetList
> , body = Http.emptyBody
> , timeout = Nothing
> }
diff --ignore-all-space --minimal --new-file --recursive main/cli/generated/Bug10398/Json.elm branch/cli/generated/Bug10398/Json.elm
0a1,42
> module Bug10398.Json exposing
> ( encodePlanet, encodePlanetList
> , decodePlanet, decodePlanetList
> )
>
> {-|
>
>
> ## Encoders
>
> @docs encodePlanet, encodePlanetList
>
>
> ## Decoders
>
> @docs decodePlanet, decodePlanetList
>
> -}
>
> import Bug10398.Types
> import Json.Decode
> import Json.Encode
>
>
> encodePlanet : Bug10398.Types.Planet -> Json.Encode.Value
> encodePlanet =
> Json.Encode.string
>
>
> encodePlanetList : Bug10398.Types.PlanetList -> Json.Encode.Value
> encodePlanetList =
> Json.Encode.list encodePlanet
>
>
> decodePlanet : Json.Decode.Decoder Bug10398.Types.Planet
> decodePlanet =
> Json.Decode.string
>
>
> decodePlanetList : Json.Decode.Decoder Bug10398.Types.PlanetList
> decodePlanetList =
> Json.Decode.list decodePlanet
diff --ignore-all-space --minimal --new-file --recursive main/cli/generated/Bug10398/Types.elm branch/cli/generated/Bug10398/Types.elm
0a1,22
> module Bug10398.Types exposing (Planet, PlanetList)
>
> {-|
>
>
> ## Aliases
>
> @docs Planet, PlanetList
>
> -}
>
>
> {-| Planet name
> -}
> type alias Planet =
> String
>
>
> {-| List of planets
> -}
> type alias PlanetList =
> List Planet
diff --ignore-all-space --minimal --new-file --recursive main/cli/generated/Bug13654/Json.elm branch/cli/generated/Bug13654/Json.elm
0a1,154809
> module Bug13654.Json exposing
> ( encodeAccount, encodeAccountAnnualRevenue, encodeAccountBacsDebitPaymentsSettings, encodeAccountBrandingSettings, encodeAccountBusinessProfile, encodeAccountCapabilities
> , encodeAccountCapabilityFutureRequirements, encodeAccountCapabilityRequirements, encodeAccountCardIssuingSettings, encodeAccountCardPaymentsSettings, encodeAccountDashboardSettings, encodeAccountDeclineChargeOn
> , encodeAccountFutureRequirements, encodeAccountGroupMembership, encodeAccountInvoicesSettings, encodeAccountLink, encodeAccountMonthlyEstimatedRevenue, encodeAccountPaymentsSettings
> , encodeAccountPayoutSettings, encodeAccountRequirements, encodeAccountRequirementsAlternative, encodeAccountRequirementsError, encodeAccountSepaDebitPaymentsSettings, encodeAccountSession
> , encodeAccountSettings, encodeAccountTermsOfService, encodeAccountTosAcceptance, encodeAccountTreasurySettings, encodeAccountUnificationAccountController, encodeAccountUnificationAccountControllerFees
> , encodeAccountUnificationAccountControllerLosses, encodeAccountUnificationAccountControllerStripeDashboard, encodeAddress, encodeAlmaInstallments, encodeAmazonPayUnderlyingPaymentMethodFundingDetails, encodeApiErrors
> , encodeApplePayDomain, encodeApplication, encodeApplicationFee, encodeAppssecret, encodeAutomaticTax, encodeBalance
> , encodeBalanceAmount, encodeBalanceAmountBySourceType, encodeBalanceAmountNet, encodeBalanceDetail, encodeBalanceDetailUngated, encodeBalanceNetAvailable
> , encodeBalanceSettings, encodeBalanceSettingsResourcePayments, encodeBalanceSettingsResourcePayoutSchedule, encodeBalanceSettingsResourcePayouts, encodeBalanceSettingsResourceSettlementTiming, encodeBalanceTransaction
> , encodeBankAccount, encodeBankConnectionsResourceAccountNumberDetails, encodeBankConnectionsResourceAccountholder, encodeBankConnectionsResourceBalance, encodeBankConnectionsResourceBalanceApiResourceCashBalance, encodeBankConnectionsResourceBalanceApiResourceCreditBalance
> , encodeBankConnectionsResourceBalanceRefresh, encodeBankConnectionsResourceLinkAccountSessionFilters, encodeBankConnectionsResourceOwnershipRefresh, encodeBankConnectionsResourceTransactionRefresh, encodeBankConnectionsResourceTransactionResourceStatusTransitions, encodeBillingBillResourceInvoiceItemParentsInvoiceItemParent
> , encodeBillingBillResourceInvoiceItemParentsInvoiceItemSubscriptionParent, encodeBillingBillResourceInvoicingLinesCommonCreditedItems, encodeBillingBillResourceInvoicingLinesCommonProrationDetails, encodeBillingBillResourceInvoicingLinesParentsInvoiceLineItemInvoiceItemParent, encodeBillingBillResourceInvoicingLinesParentsInvoiceLineItemParent, encodeBillingBillResourceInvoicingLinesParentsInvoiceLineItemSubscriptionItemParent
> , encodeBillingBillResourceInvoicingParentsInvoiceParent, encodeBillingBillResourceInvoicingParentsInvoiceQuoteParent, encodeBillingBillResourceInvoicingParentsInvoiceSubscriptionParent, encodeBillingBillResourceInvoicingPricingPricing, encodeBillingBillResourceInvoicingPricingPricingPriceDetails, encodeBillingBillResourceInvoicingTaxesTax
> , encodeBillingBillResourceInvoicingTaxesTaxRateDetails, encodeBillingClocksResourceStatusDetailsAdvancingStatusDetails, encodeBillingClocksResourceStatusDetailsStatusDetails, encodeBillingCreditGrantsResourceAmount, encodeBillingCreditGrantsResourceApplicabilityConfig, encodeBillingCreditGrantsResourceApplicablePrice
> , encodeBillingCreditGrantsResourceBalanceCredit, encodeBillingCreditGrantsResourceBalanceCreditsApplicationInvoiceVoided, encodeBillingCreditGrantsResourceBalanceCreditsApplied, encodeBillingCreditGrantsResourceBalanceDebit, encodeBillingCreditGrantsResourceMonetaryAmount, encodeBillingCreditGrantsResourceScope
> , encodeBillingDetails, encodeBillingMeterResourceAggregationSettings, encodeBillingMeterResourceBillingMeterEventAdjustmentCancel, encodeBillingMeterResourceBillingMeterStatusTransitions, encodeBillingMeterResourceBillingMeterValue, encodeBillingMeterResourceCustomerMappingSettings
> , encodeBillingPortalconfiguration, encodeBillingPortalsession, encodeBillingalert, encodeBillingcreditBalanceSummary, encodeBillingcreditBalanceTransaction, encodeBillingcreditGrant
> , encodeBillingmeter, encodeBillingmeterEvent, encodeBillingmeterEventAdjustment, encodeBillingmeterEventSummary, encodeCancellationDetails, encodeCapability
> , encodeCard, encodeCardGeneratedFromPaymentMethodDetails, encodeCardIssuingAccountTermsOfService, encodeCardMandatePaymentMethodDetails, encodeCashBalance, encodeCharge
> , encodeChargeFraudDetails, encodeChargeOutcome, encodeChargeTransferData, encodeCheckoutAcssDebitMandateOptions, encodeCheckoutAcssDebitPaymentMethodOptions, encodeCheckoutAffirmPaymentMethodOptions
> , encodeCheckoutAfterpayClearpayPaymentMethodOptions, encodeCheckoutAlipayPaymentMethodOptions, encodeCheckoutAlmaPaymentMethodOptions, encodeCheckoutAmazonPayPaymentMethodOptions, encodeCheckoutAuBecsDebitPaymentMethodOptions, encodeCheckoutBacsDebitPaymentMethodOptions
> , encodeCheckoutBancontactPaymentMethodOptions, encodeCheckoutBilliePaymentMethodOptions, encodeCheckoutBoletoPaymentMethodOptions, encodeCheckoutCardInstallmentsOptions, encodeCheckoutCardPaymentMethodOptions, encodeCheckoutCashappPaymentMethodOptions
> , encodeCheckoutCustomerBalanceBankTransferPaymentMethodOptions, encodeCheckoutCustomerBalancePaymentMethodOptions, encodeCheckoutEpsPaymentMethodOptions, encodeCheckoutFpxPaymentMethodOptions, encodeCheckoutGiropayPaymentMethodOptions, encodeCheckoutGrabPayPaymentMethodOptions
> , encodeCheckoutIdealPaymentMethodOptions, encodeCheckoutKakaoPayPaymentMethodOptions, encodeCheckoutKlarnaPaymentMethodOptions, encodeCheckoutKonbiniPaymentMethodOptions, encodeCheckoutKrCardPaymentMethodOptions, encodeCheckoutLinkPaymentMethodOptions
> , encodeCheckoutLinkWalletOptions, encodeCheckoutMobilepayPaymentMethodOptions, encodeCheckoutMultibancoPaymentMethodOptions, encodeCheckoutNaverPayPaymentMethodOptions, encodeCheckoutOxxoPaymentMethodOptions, encodeCheckoutP24PaymentMethodOptions
> , encodeCheckoutPaycoPaymentMethodOptions, encodeCheckoutPaymentMethodOptionsMandateOptionsBacsDebit, encodeCheckoutPaymentMethodOptionsMandateOptionsSepaDebit, encodeCheckoutPaynowPaymentMethodOptions, encodeCheckoutPaypalPaymentMethodOptions, encodeCheckoutPaytoPaymentMethodOptions
> , encodeCheckoutPixPaymentMethodOptions, encodeCheckoutRevolutPayPaymentMethodOptions, encodeCheckoutSamsungPayPaymentMethodOptions, encodeCheckoutSatispayPaymentMethodOptions, encodeCheckoutSepaDebitPaymentMethodOptions, encodeCheckoutSessionPaymentMethodOptions
> , encodeCheckoutSessionWalletOptions, encodeCheckoutSofortPaymentMethodOptions, encodeCheckoutSwishPaymentMethodOptions, encodeCheckoutTwintPaymentMethodOptions, encodeCheckoutUsBankAccountPaymentMethodOptions, encodeCheckoutsession
> , encodeClimateRemovalsBeneficiary, encodeClimateRemovalsLocation, encodeClimateRemovalsOrderDeliveries, encodeClimateRemovalsProductsPrice, encodeClimateorder, encodeClimateproduct
> , encodeClimatesupplier, encodeConfirmationToken, encodeConfirmationTokensResourceMandateData, encodeConfirmationTokensResourceMandateDataResourceCustomerAcceptance, encodeConfirmationTokensResourceMandateDataResourceCustomerAcceptanceResourceOnline, encodeConfirmationTokensResourcePaymentMethodOptions
> , encodeConfirmationTokensResourcePaymentMethodOptionsResourceCard, encodeConfirmationTokensResourcePaymentMethodOptionsResourceCardResourceInstallment, encodeConfirmationTokensResourcePaymentMethodPreview, encodeConfirmationTokensResourceShipping, encodeConnectAccountReference, encodeConnectCollectionTransfer
> , encodeConnectEmbeddedAccountConfigClaim, encodeConnectEmbeddedAccountFeaturesClaim, encodeConnectEmbeddedAccountSessionCreateComponents, encodeConnectEmbeddedBaseConfigClaim, encodeConnectEmbeddedBaseFeatures, encodeConnectEmbeddedDisputesListConfig
> , encodeConnectEmbeddedDisputesListFeatures, encodeConnectEmbeddedFinancialAccountConfigClaim, encodeConnectEmbeddedFinancialAccountFeatures, encodeConnectEmbeddedFinancialAccountTransactionsConfigClaim, encodeConnectEmbeddedFinancialAccountTransactionsFeatures, encodeConnectEmbeddedInstantPayoutsPromotionConfig
> , encodeConnectEmbeddedInstantPayoutsPromotionFeatures, encodeConnectEmbeddedIssuingCardConfigClaim, encodeConnectEmbeddedIssuingCardFeatures, encodeConnectEmbeddedIssuingCardsListConfigClaim, encodeConnectEmbeddedIssuingCardsListFeatures, encodeConnectEmbeddedPaymentDisputesConfig
> , encodeConnectEmbeddedPaymentDisputesFeatures, encodeConnectEmbeddedPaymentsConfigClaim, encodeConnectEmbeddedPaymentsFeatures, encodeConnectEmbeddedPayoutsConfig, encodeConnectEmbeddedPayoutsFeatures, encodeCountrySpec
> , encodeCountrySpecVerificationFieldDetails, encodeCountrySpecVerificationFields, encodeCoupon, encodeCouponAppliesTo, encodeCouponCurrencyOption, encodeCreditBalance
> , encodeCreditNote, encodeCreditNoteLineItem, encodeCreditNoteRefund, encodeCreditNotesPaymentRecordRefund, encodeCreditNotesPretaxCreditAmount, encodeCurrencyOption
> , encodeCustomLogo, encodeCustomUnitAmount, encodeCustomer, encodeCustomerAcceptance, encodeCustomerBalanceCustomerBalanceSettings, encodeCustomerBalanceResourceCashBalanceTransactionResourceAdjustedForOverdraft
> , encodeCustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction, encodeCustomerBalanceResourceCashBalanceTransactionResourceFundedTransaction, encodeCustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransfer, encodeCustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransfer, encodeCustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceGbBankTransfer, encodeCustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceJpBankTransfer
> , encodeCustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceUsBankTransfer, encodeCustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransaction, encodeCustomerBalanceResourceCashBalanceTransactionResourceTransferredToBalance, encodeCustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransaction, encodeCustomerBalanceTransaction, encodeCustomerCashBalanceTransaction
> , encodeCustomerSession, encodeCustomerSessionResourceComponents, encodeCustomerSessionResourceComponentsResourceBuyButton, encodeCustomerSessionResourceComponentsResourceCustomerSheet, encodeCustomerSessionResourceComponentsResourceCustomerSheetResourceFeatures, encodeCustomerSessionResourceComponentsResourceMobilePaymentElement
> , encodeCustomerSessionResourceComponentsResourceMobilePaymentElementResourceFeatures, encodeCustomerSessionResourceComponentsResourcePaymentElement, encodeCustomerSessionResourceComponentsResourcePaymentElementResourceFeatures, encodeCustomerSessionResourceComponentsResourcePricingTable, encodeCustomerTax, encodeCustomerTaxLocation
> , encodeDeletedAccount, encodeDeletedApplePayDomain, encodeDeletedApplication, encodeDeletedBankAccount, encodeDeletedCard, encodeDeletedCoupon
> , encodeDeletedCustomer, encodeDeletedDiscount, encodeDeletedExternalAccount, encodeDeletedInvoice, encodeDeletedInvoiceitem, encodeDeletedPaymentSource
> , encodeDeletedPerson, encodeDeletedPlan, encodeDeletedPrice, encodeDeletedProduct, encodeDeletedProductFeature, encodeDeletedRadarvalueList
> , encodeDeletedRadarvalueListItem, encodeDeletedSubscriptionItem, encodeDeletedTaxId, encodeDeletedTerminalconfiguration, encodeDeletedTerminallocation, encodeDeletedTerminalreader
> , encodeDeletedTestHelperstestClock, encodeDeletedWebhookEndpoint, encodeDestinationDetailsUnimplemented, encodeDiscount, encodeDiscountSource, encodeDiscountsResourceDiscountAmount
> , encodeDiscountsResourceStackableDiscount, encodeDispute, encodeDisputeEnhancedEligibility, encodeDisputeEnhancedEligibilityVisaCompellingEvidence3, encodeDisputeEnhancedEligibilityVisaCompliance, encodeDisputeEnhancedEvidence
> , encodeDisputeEnhancedEvidenceVisaCompellingEvidence3, encodeDisputeEnhancedEvidenceVisaCompliance, encodeDisputeEvidence, encodeDisputeEvidenceDetails, encodeDisputePaymentMethodDetails, encodeDisputePaymentMethodDetailsAmazonPay
> , encodeDisputePaymentMethodDetailsCard, encodeDisputePaymentMethodDetailsKlarna, encodeDisputePaymentMethodDetailsPaypal, encodeDisputeTransactionShippingAddress, encodeDisputeVisaCompellingEvidence3DisputedTransaction, encodeDisputeVisaCompellingEvidence3PriorUndisputedTransaction
> , encodeEmailSent, encodeEntitlementsactiveEntitlement, encodeEntitlementsfeature, encodeEphemeralKey, encodeError, encodeEvent
> , encodeExchangeRate, encodeExternalAccount, encodeExternalAccountRequirements, encodeFabricService, encodeFee, encodeFeeRefund
> , encodeFile, encodeFileLink, encodeFinancialConnectionsaccount, encodeFinancialConnectionsaccountOwner, encodeFinancialConnectionsaccountOwnership, encodeFinancialConnectionssession
> , encodeFinancialConnectionstransaction, encodeFinancialReportingFinanceReportRunRunParameters, encodeForwardedRequestContext, encodeForwardedRequestDetails, encodeForwardedRequestHeader, encodeForwardedResponseDetails
> , encodeForwardingrequest, encodeFundingInstructions, encodeFundingInstructionsBankTransfer, encodeFundingInstructionsBankTransferAbaRecord, encodeFundingInstructionsBankTransferFinancialAddress, encodeFundingInstructionsBankTransferIbanRecord
> , encodeFundingInstructionsBankTransferSortCodeRecord, encodeFundingInstructionsBankTransferSpeiRecord, encodeFundingInstructionsBankTransferSwiftRecord, encodeFundingInstructionsBankTransferZenginRecord, encodeGelatoDataDocumentReportDateOfBirth, encodeGelatoDataDocumentReportExpirationDate
> , encodeGelatoDataDocumentReportIssuedDate, encodeGelatoDataIdNumberReportDate, encodeGelatoDataVerifiedOutputsDate, encodeGelatoDocumentReport, encodeGelatoDocumentReportError, encodeGelatoEmailReport
> , encodeGelatoEmailReportError, encodeGelatoIdNumberReport, encodeGelatoIdNumberReportError, encodeGelatoPhoneReport, encodeGelatoPhoneReportError, encodeGelatoProvidedDetails
> , encodeGelatoRelatedPerson, encodeGelatoReportDocumentOptions, encodeGelatoReportIdNumberOptions, encodeGelatoSelfieReport, encodeGelatoSelfieReportError, encodeGelatoSessionDocumentOptions
> , encodeGelatoSessionEmailOptions, encodeGelatoSessionIdNumberOptions, encodeGelatoSessionLastError, encodeGelatoSessionMatchingOptions, encodeGelatoSessionPhoneOptions, encodeGelatoVerificationReportOptions
> , encodeGelatoVerificationSessionOptions, encodeGelatoVerifiedOutputs, encodeIdentityverificationReport, encodeIdentityverificationSession, encodeInboundTransfers, encodeInboundTransfersPaymentMethodDetailsUsBankAccount
> , encodeInsightsResourcesPaymentEvaluationAddress, encodeInsightsResourcesPaymentEvaluationBillingDetails, encodeInsightsResourcesPaymentEvaluationCardIssuerDecline, encodeInsightsResourcesPaymentEvaluationClientDeviceMetadata, encodeInsightsResourcesPaymentEvaluationCustomerDetails, encodeInsightsResourcesPaymentEvaluationDisputeOpened
> , encodeInsightsResourcesPaymentEvaluationEarlyFraudWarningReceived, encodeInsightsResourcesPaymentEvaluationEvent, encodeInsightsResourcesPaymentEvaluationInsights, encodeInsightsResourcesPaymentEvaluationMerchantBlocked, encodeInsightsResourcesPaymentEvaluationMoneyMovementCard, encodeInsightsResourcesPaymentEvaluationMoneyMovementDetails
> , encodeInsightsResourcesPaymentEvaluationOutcome, encodeInsightsResourcesPaymentEvaluationPaymentDetails, encodeInsightsResourcesPaymentEvaluationPaymentMethodDetails, encodeInsightsResourcesPaymentEvaluationRefunded, encodeInsightsResourcesPaymentEvaluationRejected, encodeInsightsResourcesPaymentEvaluationRejectedCard
> , encodeInsightsResourcesPaymentEvaluationScorer, encodeInsightsResourcesPaymentEvaluationShipping, encodeInsightsResourcesPaymentEvaluationSucceeded, encodeInsightsResourcesPaymentEvaluationSucceededCard, encodeInsightsResourcesPaymentEvaluationUserInterventionRaised, encodeInsightsResourcesPaymentEvaluationUserInterventionRaisedCustom
> , encodeInsightsResourcesPaymentEvaluationUserInterventionResolved, encodeInternalCard, encodeInvoice, encodeInvoiceInstallmentsCard, encodeInvoiceItemThresholdReason, encodeInvoiceLineItemPeriod
> , encodeInvoiceMandateOptionsCard, encodeInvoiceMandateOptionsPayto, encodeInvoicePayment, encodeInvoicePaymentMethodOptionsAcssDebit, encodeInvoicePaymentMethodOptionsAcssDebitMandateOptions, encodeInvoicePaymentMethodOptionsBancontact
> , encodeInvoicePaymentMethodOptionsCard, encodeInvoicePaymentMethodOptionsCustomerBalance, encodeInvoicePaymentMethodOptionsCustomerBalanceBankTransfer, encodeInvoicePaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer, encodeInvoicePaymentMethodOptionsKonbini, encodeInvoicePaymentMethodOptionsPayto
> , encodeInvoicePaymentMethodOptionsSepaDebit, encodeInvoicePaymentMethodOptionsUsBankAccount, encodeInvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptions, encodeInvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsFilters, encodeInvoiceRenderingPdf, encodeInvoiceRenderingTemplate
> , encodeInvoiceSettingCheckoutRenderingOptions, encodeInvoiceSettingCustomField, encodeInvoiceSettingCustomerRenderingOptions, encodeInvoiceSettingCustomerSetting, encodeInvoiceSettingQuoteSetting, encodeInvoiceSettingSubscriptionSchedulePhaseSetting
> , encodeInvoiceSettingSubscriptionScheduleSetting, encodeInvoiceThresholdReason, encodeInvoiceitem, encodeInvoicesPaymentMethodOptions, encodeInvoicesPaymentSettings, encodeInvoicesPaymentsInvoicePaymentAssociatedPayment
> , encodeInvoicesPaymentsInvoicePaymentStatusTransitions, encodeInvoicesResourceConfirmationSecret, encodeInvoicesResourceFromInvoice, encodeInvoicesResourceInvoiceRendering, encodeInvoicesResourceInvoiceTaxId, encodeInvoicesResourcePretaxCreditAmount
> , encodeInvoicesResourceShippingCost, encodeInvoicesResourceStatusTransitions, encodeIssuingAuthorizationAmountDetails, encodeIssuingAuthorizationAuthenticationExemption, encodeIssuingAuthorizationFleetCardholderPromptData, encodeIssuingAuthorizationFleetData
> , encodeIssuingAuthorizationFleetFuelPriceData, encodeIssuingAuthorizationFleetNonFuelPriceData, encodeIssuingAuthorizationFleetReportedBreakdown, encodeIssuingAuthorizationFleetTaxData, encodeIssuingAuthorizationFraudChallenge, encodeIssuingAuthorizationFuelData
> , encodeIssuingAuthorizationMerchantData, encodeIssuingAuthorizationNetworkData, encodeIssuingAuthorizationPendingRequest, encodeIssuingAuthorizationRequest, encodeIssuingAuthorizationThreeDSecure, encodeIssuingAuthorizationTreasury
> , encodeIssuingAuthorizationVerificationData, encodeIssuingCardApplePay, encodeIssuingCardAuthorizationControls, encodeIssuingCardFraudWarning, encodeIssuingCardGooglePay, encodeIssuingCardShipping
> , encodeIssuingCardShippingAddressValidation, encodeIssuingCardShippingCustoms, encodeIssuingCardSpendingLimit, encodeIssuingCardWallets, encodeIssuingCardholderAddress, encodeIssuingCardholderAuthorizationControls
> , encodeIssuingCardholderCardIssuing, encodeIssuingCardholderCompany, encodeIssuingCardholderIdDocument, encodeIssuingCardholderIndividual, encodeIssuingCardholderIndividualDob, encodeIssuingCardholderRequirements
> , encodeIssuingCardholderSpendingLimit, encodeIssuingCardholderUserTermsAcceptance, encodeIssuingCardholderVerification, encodeIssuingDisputeCanceledEvidence, encodeIssuingDisputeDuplicateEvidence, encodeIssuingDisputeEvidence
> , encodeIssuingDisputeFraudulentEvidence, encodeIssuingDisputeMerchandiseNotAsDescribedEvidence, encodeIssuingDisputeNoValidAuthorizationEvidence, encodeIssuingDisputeNotReceivedEvidence, encodeIssuingDisputeOtherEvidence, encodeIssuingDisputeServiceNotAsDescribedEvidence
> , encodeIssuingDisputeTreasury, encodeIssuingNetworkTokenAddress, encodeIssuingNetworkTokenDevice, encodeIssuingNetworkTokenMastercard, encodeIssuingNetworkTokenNetworkData, encodeIssuingNetworkTokenVisa
> , encodeIssuingNetworkTokenWalletProvider, encodeIssuingPersonalizationDesignCarrierText, encodeIssuingPersonalizationDesignPreferences, encodeIssuingPersonalizationDesignRejectionReasons, encodeIssuingPhysicalBundleFeatures, encodeIssuingTransactionAmountDetails
> , encodeIssuingTransactionFleetCardholderPromptData, encodeIssuingTransactionFleetData, encodeIssuingTransactionFleetFuelPriceData, encodeIssuingTransactionFleetNonFuelPriceData, encodeIssuingTransactionFleetReportedBreakdown, encodeIssuingTransactionFleetTaxData
> , encodeIssuingTransactionFlightData, encodeIssuingTransactionFlightDataLeg, encodeIssuingTransactionFuelData, encodeIssuingTransactionLodgingData, encodeIssuingTransactionNetworkData, encodeIssuingTransactionPurchaseDetails
> , encodeIssuingTransactionReceiptData, encodeIssuingTransactionTreasury, encodeIssuingauthorization, encodeIssuingcard, encodeIssuingcardholder, encodeIssuingdispute
> , encodeIssuingpersonalizationDesign, encodeIssuingphysicalBundle, encodeIssuingsettlement, encodeIssuingtoken, encodeIssuingtransaction, encodeItem
> , encodeKlarnaAddress, encodeKlarnaPayerDetails, encodeLegalEntityCompany, encodeLegalEntityCompanyVerification, encodeLegalEntityCompanyVerificationDocument, encodeLegalEntityDirectorshipDeclaration
> , encodeLegalEntityDob, encodeLegalEntityJapanAddress, encodeLegalEntityPersonVerification, encodeLegalEntityPersonVerificationDocument, encodeLegalEntityRegistrationDate, encodeLegalEntityRepresentativeDeclaration
> , encodeLegalEntityUboDeclaration, encodeLineItem, encodeLineItemsAdjustableQuantity, encodeLineItemsDiscountAmount, encodeLineItemsTaxAmount, encodeLinkedAccountOptionsCommon
> , encodeLoginLink, encodeMandate, encodeMandateAcssDebit, encodeMandateAmazonPay, encodeMandateAuBecsDebit, encodeMandateBacsDebit
> , encodeMandateCashapp, encodeMandateKakaoPay, encodeMandateKlarna, encodeMandateKrCard, encodeMandateLink, encodeMandateMultiUse
> , encodeMandateNaverPay, encodeMandateNzBankAccount, encodeMandateOptionsPayto, encodeMandatePaymentMethodDetails, encodeMandatePaypal, encodeMandatePayto
> , encodeMandateRevolutPay, encodeMandateSepaDebit, encodeMandateSingleUse, encodeMandateUsBankAccount, encodeNetworks, encodeNotificationEventData
> , encodeNotificationEventRequest, encodeOfflineAcceptance, encodeOnlineAcceptance, encodeOutboundPaymentsPaymentMethodDetails, encodeOutboundPaymentsPaymentMethodDetailsFinancialAccount, encodeOutboundPaymentsPaymentMethodDetailsUsBankAccount
> , encodeOutboundTransfersPaymentMethodDetails, encodeOutboundTransfersPaymentMethodDetailsFinancialAccount, encodeOutboundTransfersPaymentMethodDetailsUsBankAccount, encodePackageDimensions, encodePaymentAttemptRecord, encodePaymentFlowsAmountDetails
> , encodePaymentFlowsAmountDetailsClient, encodePaymentFlowsAmountDetailsClientResourceTip, encodePaymentFlowsAmountDetailsResourceError, encodePaymentFlowsAmountDetailsResourceLineItemsListResourceLineItemResourcePaymentMethodOptions, encodePaymentFlowsAmountDetailsResourceLineItemsListResourceLineItemResourceTax, encodePaymentFlowsAmountDetailsResourceShipping
> , encodePaymentFlowsAmountDetailsResourceTax, encodePaymentFlowsAutomaticPaymentMethodsPaymentIntent, encodePaymentFlowsAutomaticPaymentMethodsSetupIntent, encodePaymentFlowsInstallmentOptions, encodePaymentFlowsPaymentDetails, encodePaymentFlowsPaymentIntentAsyncWorkflows
> , encodePaymentFlowsPaymentIntentAsyncWorkflowsResourceInputs, encodePaymentFlowsPaymentIntentAsyncWorkflowsResourceInputsResourceTax, encodePaymentFlowsPaymentIntentPresentmentDetails, encodePaymentFlowsPrivatePaymentMethodsAlipay, encodePaymentFlowsPrivatePaymentMethodsAlipayDetails, encodePaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesExtendedAuthorizationExtendedAuthorization
> , encodePaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesIncrementalAuthorizationIncrementalAuthorization, encodePaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceEnterpriseFeaturesOvercaptureOvercapture, encodePaymentFlowsPrivatePaymentMethodsCardDetailsApiResourceMulticapture, encodePaymentFlowsPrivatePaymentMethodsCardPaymentIntentAmountDetailsLineItemPaymentMethodOptions, encodePaymentFlowsPrivatePaymentMethodsCardPresentAmountDetailsLineItemPaymentMethodOptions, encodePaymentFlowsPrivatePaymentMethodsCardPresentCommonWallet
> , encodePaymentFlowsPrivatePaymentMethodsFinancialConnectionsCommonLinkedAccountOptionsFilters, encodePaymentFlowsPrivatePaymentMethodsKakaoPayPaymentMethodOptions, encodePaymentFlowsPrivatePaymentMethodsKlarnaDob, encodePaymentFlowsPrivatePaymentMethodsKlarnaPaymentIntentAmountDetailsLineItemPaymentMethodOptions, encodePaymentFlowsPrivatePaymentMethodsNaverPayPaymentMethodOptions, encodePaymentFlowsPrivatePaymentMethodsPaycoPaymentMethodOptions
> , encodePaymentFlowsPrivatePaymentMethodsPaypalAmountDetailsLineItemPaymentMethodOptions, encodePaymentFlowsPrivatePaymentMethodsSamsungPayPaymentMethodOptions, encodePaymentIntent, encodePaymentIntentAmountDetailsLineItem, encodePaymentIntentCardProcessing, encodePaymentIntentNextAction
> , encodePaymentIntentNextActionAlipayHandleRedirect, encodePaymentIntentNextActionBoleto, encodePaymentIntentNextActionCardAwaitNotification, encodePaymentIntentNextActionCashappHandleRedirectOrDisplayQrCode, encodePaymentIntentNextActionCashappQrCode, encodePaymentIntentNextActionDisplayBankTransferInstructions
> , encodePaymentIntentNextActionDisplayMultibancoDetails, encodePaymentIntentNextActionDisplayOxxoDetails, encodePaymentIntentNextActionKonbini, encodePaymentIntentNextActionKonbiniFamilymart, encodePaymentIntentNextActionKonbiniLawson, encodePaymentIntentNextActionKonbiniMinistop
> , encodePaymentIntentNextActionKonbiniSeicomart, encodePaymentIntentNextActionKonbiniStores, encodePaymentIntentNextActionPaynowDisplayQrCode, encodePaymentIntentNextActionPixDisplayQrCode, encodePaymentIntentNe |
0a8c0da to
f1ee98e
Compare
This comment was marked as outdated.
This comment was marked as outdated.
f1ee98e to
1a98d8c
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Collaborator
Author
|
I'm not sure whether to merge the Stripe schema to be honest, it's full of collisions, mostly due to missing EDIT: removed the Stripe schema from the PR |
1a98d8c to
b11f421
Compare
c339a08 to
625da56
Compare
b11f421 to
472a8f7
Compare
472a8f7 to
d457a4e
Compare
This comment was marked as outdated.
This comment was marked as outdated.
d457a4e to
14c2f83
Compare
This comment was marked as outdated.
This comment was marked as outdated.
14c2f83 to
ae8d253
Compare
This comment was marked as outdated.
This comment was marked as outdated.
ae8d253 to
6656b9b
Compare
This comment was marked as outdated.
This comment was marked as outdated.
6656b9b to
c15206b
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
9156fd5 to
ea9df9a
Compare
diff --ignore-all-space --minimal --new-file --recursive main/cli/generated/Bug10398/Api.elm branch/cli/generated/Bug10398/Api.elm
0a1,97
> module Bug10398.Api exposing (getPlanet, getPlanetTask, getPlanets, getPlanetsTask)
>
> {-|
>
>
> ## swapi
>
> @docs getPlanet, getPlanetTask, getPlanets, getPlanetsTask
>
> -}
>
> import Bug10398.Json
> import Bug10398.Types
> import Dict
> import Http
> import Json.Decode
> import OpenApi.Common
> import Task
> import Url.Builder
>
>
> getPlanet :
> { toMsg :
> Result (OpenApi.Common.Error e String) Bug10398.Types.Planet -> msg
> , params : { planetId : Int }
> }
> -> Cmd msg
> getPlanet config =
> Http.request
> { url =
> Url.Builder.crossOrigin
> "https://swapi.dev/api"
> [ "planets", String.fromInt config.params.planetId ]
> []
> , method = "GET"
> , headers = []
> , expect =
> OpenApi.Common.expectJsonCustom
> (Dict.fromList [])
> Bug10398.Json.decodePlanet
> config.toMsg
> , body = Http.emptyBody
> , timeout = Nothing
> , tracker = Nothing
> }
>
>
> getPlanetTask :
> { params : { planetId : Int } }
> -> Task.Task (OpenApi.Common.Error e String) Bug10398.Types.Planet
> getPlanetTask config =
> Http.task
> { url =
> Url.Builder.crossOrigin
> "https://swapi.dev/api"
> [ "planets", String.fromInt config.params.planetId ]
> []
> , method = "GET"
> , headers = []
> , resolver =
> OpenApi.Common.jsonResolverCustom
> (Dict.fromList [])
> Bug10398.Json.decodePlanet
> , body = Http.emptyBody
> , timeout = Nothing
> }
>
>
> getPlanets config =
> Http.request
> { url = Url.Builder.crossOrigin "https://swapi.dev/api" [ "planets" ] []
> , method = "GET"
> , headers = []
> , expect =
> OpenApi.Common.expectJsonCustom
> (Dict.fromList [])
> Bug10398.Json.decodePlanetList
> config.toMsg
> , body = Http.emptyBody
> , timeout = Nothing
> , tracker = Nothing
> }
>
>
> getPlanetsTask : {} -> Task.Task (OpenApi.Common.Error e String) Bug10398.Types.PlanetList
> getPlanetsTask config =
> Http.task
> { url = Url.Builder.crossOrigin "https://swapi.dev/api" [ "planets" ] []
> , method = "GET"
> , headers = []
> , resolver =
> OpenApi.Common.jsonResolverCustom
> (Dict.fromList [])
> Bug10398.Json.decodePlanetList
> , body = Http.emptyBody
> , timeout = Nothing
> }
diff --ignore-all-space --minimal --new-file --recursive main/cli/generated/Bug10398/Json.elm branch/cli/generated/Bug10398/Json.elm
0a1,42
> module Bug10398.Json exposing
> ( encodePlanet, encodePlanetList
> , decodePlanet, decodePlanetList
> )
>
> {-|
>
>
> ## Encoders
>
> @docs encodePlanet, encodePlanetList
>
>
> ## Decoders
>
> @docs decodePlanet, decodePlanetList
>
> -}
>
> import Bug10398.Types
> import Json.Decode
> import Json.Encode
>
>
> encodePlanet : Bug10398.Types.Planet -> Json.Encode.Value
> encodePlanet =
> Json.Encode.string
>
>
> encodePlanetList : Bug10398.Types.PlanetList -> Json.Encode.Value
> encodePlanetList =
> Json.Encode.list encodePlanet
>
>
> decodePlanet : Json.Decode.Decoder Bug10398.Types.Planet
> decodePlanet =
> Json.Decode.string
>
>
> decodePlanetList : Json.Decode.Decoder Bug10398.Types.PlanetList
> decodePlanetList =
> Json.Decode.list decodePlanet
diff --ignore-all-space --minimal --new-file --recursive main/cli/generated/Bug10398/Types.elm branch/cli/generated/Bug10398/Types.elm
0a1,22
> module Bug10398.Types exposing (Planet, PlanetList)
>
> {-|
>
>
> ## Aliases
>
> @docs Planet, PlanetList
>
> -}
>
>
> {-| Planet name
> -}
> type alias Planet =
> String
>
>
> {-| List of planets
> -}
> type alias PlanetList =
> List Planet
diff --ignore-all-space --minimal --new-file --recursive main/cli/generated/Bug16104/Api.elm branch/cli/generated/Bug16104/Api.elm
0a1,52
> module Bug16104.Api exposing (example, exampleTask)
>
> {-|
>
>
> ## Operations
>
> @docs example, exampleTask
>
> -}
>
> import Bug16104.Json
> import Bug16104.Types
> import Dict
> import Http
> import Json.Decode
> import OpenApi.Common
> import Task
> import Url.Builder
>
>
> example config =
> Http.request
> { url = Url.Builder.absolute [ "example" ] []
> , method = "GET"
> , headers = []
> , expect =
> OpenApi.Common.expectJsonCustom
> (Dict.fromList [])
> (Json.Decode.list Bug16104.Json.decodeExample)
> config.toMsg
> , body = Http.emptyBody
> , timeout = Nothing
> , tracker = Nothing
> }
>
>
> exampleTask :
> {}
> -> Task.Task (OpenApi.Common.Error e String) (List Bug16104.Types.Example)
> exampleTask config =
> Http.task
> { url = Url.Builder.absolute [ "example" ] []
> , method = "GET"
> , headers = []
> , resolver =
> OpenApi.Common.jsonResolverCustom
> (Dict.fromList [])
> (Json.Decode.list Bug16104.Json.decodeExample)
> , body = Http.emptyBody
> , timeout = Nothing
> }
diff --ignore-all-space --minimal --new-file --recursive main/cli/generated/Bug16104/Json.elm branch/cli/generated/Bug16104/Json.elm
0a1,122
> module Bug16104.Json exposing
> ( encodeExample, encodeExampleGeneric, encodeExampleImages
> , decodeExample, decodeExampleGeneric, decodeExampleImages
> )
>
> {-|
>
>
> ## Encoders
>
> @docs encodeExample, encodeExampleGeneric, encodeExampleImages
>
>
> ## Decoders
>
> @docs decodeExample, decodeExampleGeneric, decodeExampleImages
>
> -}
>
> import Bug16104.Types
> import Json.Decode
> import Json.Encode
> import OpenApi.Common
>
>
> encodeExample : Bug16104.Types.Example -> Json.Encode.Value
> encodeExample rec =
> case rec of
> Bug16104.Types.Bug16104TypesExampleGeneric_Or_Bug16104TypesExampleImages__Bug16104TypesExampleGeneric content ->
> encodeExampleGeneric content
>
> Bug16104.Types.Bug16104TypesExampleGeneric_Or_Bug16104TypesExampleImages__Bug16104TypesExampleImages content ->
> encodeExampleImages content
>
>
> encodeExampleGeneric : Bug16104.Types.ExampleGeneric -> Json.Encode.Value
> encodeExampleGeneric rec =
> Json.Encode.object
> [ ( "content", Json.Encode.string rec.content )
> , ( "tag", Json.Encode.string rec.tag )
> ]
>
>
> encodeExampleImages : Bug16104.Types.ExampleImages -> Json.Encode.Value
> encodeExampleImages rec =
> Json.Encode.object
> [ ( "images", Json.Encode.list Json.Encode.string rec.images )
> , ( "tag", Json.Encode.string rec.tag )
> ]
>
>
> decodeExample : Json.Decode.Decoder Bug16104.Types.Example
> decodeExample =
> Json.Decode.oneOf
> [ Json.Decode.map
> Bug16104.Types.Bug16104TypesExampleGeneric_Or_Bug16104TypesExampleImages__Bug16104TypesExampleGeneric
> decodeExampleGeneric
> , Json.Decode.map
> Bug16104.Types.Bug16104TypesExampleGeneric_Or_Bug16104TypesExampleImages__Bug16104TypesExampleImages
> decodeExampleImages
> ]
>
>
> decodeExampleGeneric : Json.Decode.Decoder Bug16104.Types.ExampleGeneric
> decodeExampleGeneric =
> Json.Decode.succeed
> (\content tag -> { content = content, tag = tag })
> |> OpenApi.Common.jsonDecodeAndMap
> (Json.Decode.field "content" Json.Decode.string)
> |> OpenApi.Common.jsonDecodeAndMap
> (Json.Decode.field
> "tag"
> (Json.Decode.andThen
> (\andThenUnpack ->
> case
> andThenUnpack
> of
> "generic" ->
> Json.Decode.succeed
> "generic"
>
> _ ->
> Json.Decode.fail
> (("Value \"" ++ andThenUnpack)
> ++ "\" is not valid for the enum, possible values: \"generic\""
> )
> )
> Json.Decode.string
> )
> )
>
>
> decodeExampleImages : Json.Decode.Decoder Bug16104.Types.ExampleImages
> decodeExampleImages =
> Json.Decode.succeed
> (\images tag -> { images = images, tag = tag })
> |> OpenApi.Common.jsonDecodeAndMap
> (Json.Decode.field
> "images"
> (Json.Decode.list Json.Decode.string)
> )
> |> OpenApi.Common.jsonDecodeAndMap
> (Json.Decode.field
> "tag"
> (Json.Decode.andThen
> (\andThenUnpack ->
> case
> andThenUnpack
> of
> "images" ->
> Json.Decode.succeed
> "images"
>
> _ ->
> Json.Decode.fail
> (("Value \"" ++ andThenUnpack)
> ++ "\" is not valid for the enum, possible values: \"images\""
> )
> )
> Json.Decode.string
> )
> )
diff --ignore-all-space --minimal --new-file --recursive main/cli/generated/Bug16104/Types.elm branch/cli/generated/Bug16104/Types.elm
0a1,35
> module Bug16104.Types exposing
> ( Example, ExampleGeneric, ExampleImages
> , Bug16104TypesExampleGeneric_Or_Bug16104TypesExampleImages(..)
> )
>
> {-|
>
>
> ## Aliases
>
> @docs Example, ExampleGeneric, ExampleImages
>
>
> ## One of
>
> @docs Bug16104TypesExampleGeneric_Or_Bug16104TypesExampleImages
>
> -}
>
>
> type alias Example =
> Bug16104TypesExampleGeneric_Or_Bug16104TypesExampleImages
>
>
> type alias ExampleGeneric =
> { content : String, tag : String }
>
>
> type alias ExampleImages =
> { images : List String, tag : String }
>
>
> type Bug16104TypesExampleGeneric_Or_Bug16104TypesExampleImages
> = Bug16104TypesExampleGeneric_Or_Bug16104TypesExampleImages__Bug16104TypesExampleGeneric ExampleGeneric
> | Bug16104TypesExampleGeneric_Or_Bug16104TypesExampleImages__Bug16104TypesExampleImages ExampleImages
diff --ignore-all-space --minimal --new-file --recursive main/cli/generated/Bug22119/Json.elm branch/cli/generated/Bug22119/Json.elm
0a1,74
> module Bug22119.Json exposing
> ( encodeTestObject
> , decodeTestObject
> )
>
> {-|
>
>
> ## Encoders
>
> @docs encodeTestObject
>
>
> ## Decoders
>
> @docs decodeTestObject
>
> -}
>
> import Bug22119.Types
> import Json.Decode
> import Json.Encode
> import OpenApi.Common
>
>
> encodeTestObject : Bug22119.Types.TestObject -> Json.Encode.Value
> encodeTestObject rec =
> Json.Encode.object
> (List.filterMap
> Basics.identity
> [ Maybe.map
> (\mapUnpack ->
> ( "body", Json.Encode.list Json.Encode.string mapUnpack )
> )
> rec.body
> ]
> )
>
>
> decodeTestObject : Json.Decode.Decoder Bug22119.Types.TestObject
> decodeTestObject =
> Json.Decode.succeed
> (\body -> { body = body })
> |> OpenApi.Common.jsonDecodeAndMap
> (OpenApi.Common.decodeOptionalField
> "body"
> (Json.Decode.list
> (Json.Decode.andThen
> (\andThenUnpack ->
> case
> andThenUnpack
> of
> "ENUM_FIRST" ->
> Json.Decode.succeed
> "ENUM_FIRST"
>
> "ENUM_SECOND" ->
> Json.Decode.succeed
> "ENUM_SECOND"
>
> "ENUM_THIRD" ->
> Json.Decode.succeed
> "ENUM_THIRD"
>
> _ ->
> Json.Decode.fail
> (("Value \"" ++ andThenUnpack)
> ++ "\" is not valid for the enum, possible values: \"ENUM_FIRST\", \"ENUM_SECOND\", \"ENUM_THIRD\""
> )
> )
> Json.Decode.string
> )
> )
> )
diff --ignore-all-space --minimal --new-file --recursive main/cli/generated/Bug22119/Types.elm branch/cli/generated/Bug22119/Types.elm
0a1,14
> module Bug22119.Types exposing (TestObject)
>
> {-|
>
>
> ## Aliases
>
> @docs TestObject
>
> -}
>
>
> type alias TestObject =
> { body : Maybe (List String) }
diff --ignore-all-space --minimal --new-file --recursive main/cli/generated/Bug22530/Api.elm branch/cli/generated/Bug22530/Api.elm
0a1,98
> module Bug22530.Api exposing (somethingControllerGet, somethingControllerGetTask)
>
> {-|
>
>
> ## something-controller
>
> @docs somethingControllerGet, somethingControllerGetTask
>
> -}
>
> import Dict
> import Http
> import Json.Decode
> import OpenApi.Common
> import Task
> import Url.Builder
>
>
> somethingControllerGet config =
> Http.request
> { url =
> Url.Builder.crossOrigin
> "http://127.0.0.1:3000"
> [ "api", "something" ]
> []
> , method = "GET"
> , headers = []
> , expect =
> OpenApi.Common.expectJsonCustom
> (Dict.fromList [])
> (Json.Decode.list
> (Json.Decode.andThen
> (\andThenUnpack ->
> case andThenUnpack of
> "SOMETHING" ->
> Json.Decode.succeed "SOMETHING"
>
> "SOMETHING_ELSE" ->
> Json.Decode.succeed "SOMETHING_ELSE"
>
> "SOMETHING_MORE" ->
> Json.Decode.succeed "SOMETHING_MORE"
>
> _ ->
> Json.Decode.fail
> (("Value \"" ++ andThenUnpack)
> ++ "\" is not valid for the enum, possible values: \"SOMETHING\", \"SOMETHING_ELSE\", \"SOMETHING_MORE\""
> )
> )
> Json.Decode.string
> )
> )
> config.toMsg
> , body = Http.emptyBody
> , timeout = Nothing
> , tracker = Nothing
> }
>
>
> somethingControllerGetTask : {} -> Task.Task (OpenApi.Common.Error e String) (List String)
> somethingControllerGetTask config =
> Http.task
> { url =
> Url.Builder.crossOrigin
> "http://127.0.0.1:3000"
> [ "api", "something" ]
> []
> , method = "GET"
> , headers = []
> , resolver =
> OpenApi.Common.jsonResolverCustom
> (Dict.fromList [])
> (Json.Decode.list
> (Json.Decode.andThen
> (\andThenUnpack ->
> case andThenUnpack of
> "SOMETHING" ->
> Json.Decode.succeed "SOMETHING"
>
> "SOMETHING_ELSE" ->
> Json.Decode.succeed "SOMETHING_ELSE"
>
> "SOMETHING_MORE" ->
> Json.Decode.succeed "SOMETHING_MORE"
>
> _ ->
> Json.Decode.fail
> (("Value \"" ++ andThenUnpack)
> ++ "\" is not valid for the enum, possible values: \"SOMETHING\", \"SOMETHING_ELSE\", \"SOMETHING_MORE\""
> )
> )
> Json.Decode.string
> )
> )
> , body = Http.emptyBody
> , timeout = Nothing
> }
diff --ignore-all-space --minimal --new-file --recursive main/cli/generated/Bug7889/Api.elm branch/cli/generated/Bug7889/Api.elm
0a1,110
> module Bug7889.Api exposing (getArticles, getArticlesTask)
>
> {-|
>
>
> ## Operations
>
> @docs getArticles, getArticlesTask
>
> -}
>
> import Bug7889.Types
> import Dict
> import Http
> import Json.Decode
> import OpenApi.Common
> import Task
> import Url.Builder
>
>
> {-| Get articles
> -}
> getArticles :
> { toMsg : Result (OpenApi.Common.Error e String) () -> msg
> , params : { category : Maybe (List Bug7889.Types.ArticleCategory) }
> }
> -> Cmd msg
> getArticles config =
> Http.request
> { url =
> Url.Builder.absolute
> [ "articles" ]
> (List.filterMap
> Basics.identity
> [ Maybe.map
> (Url.Builder.string "category")
> (Maybe.andThen
> (\andThenUnpack ->
> if List.isEmpty andThenUnpack then
> Nothing
>
> else
> Just
> (String.join
> ","
> (List.map
> Bug7889.Types.articleCategoryToString
> andThenUnpack
> )
> )
> )
> config.params.category
> )
> ]
> )
> , method = "GET"
> , headers = []
> , expect =
> OpenApi.Common.expectJsonCustom
> (Dict.fromList [])
> (Json.Decode.succeed ())
> config.toMsg
> , body = Http.emptyBody
> , timeout = Nothing
> , tracker = Nothing
> }
>
>
> {-| Get articles
> -}
> getArticlesTask :
> { params : { category : Maybe (List Bug7889.Types.ArticleCategory) } }
> -> Task.Task (OpenApi.Common.Error e String) ()
> getArticlesTask config =
> Http.task
> { url =
> Url.Builder.absolute
> [ "articles" ]
> (List.filterMap
> Basics.identity
> [ Maybe.map
> (Url.Builder.string "category")
> (Maybe.andThen
> (\andThenUnpack ->
> if List.isEmpty andThenUnpack then
> Nothing
>
> else
> Just
> (String.join
> ","
> (List.map
> Bug7889.Types.articleCategoryToString
> andThenUnpack
> )
> )
> )
> config.params.category
> )
> ]
> )
> , method = "GET"
> , headers = []
> , resolver =
> OpenApi.Common.jsonResolverCustom
> (Dict.fromList [])
> (Json.Decode.succeed ())
> , body = Http.emptyBody
> , timeout = Nothing
> }
diff --ignore-all-space --minimal --new-file --recursive main/cli/generated/Bug7889/Json.elm branch/cli/generated/Bug7889/Json.elm
0a1,42
> module Bug7889.Json exposing
> ( encodeArticleCategory
> , decodeArticleCategory
> )
>
> {-|
>
>
> ## Encoders
>
> @docs encodeArticleCategory
>
>
> ## Decoders
>
> @docs decodeArticleCategory
>
> -}
>
> import Bug7889.Types
> import Json.Decode
> import Json.Encode
>
>
> encodeArticleCategory : Bug7889.Types.ArticleCategory -> Json.Encode.Value
> encodeArticleCategory rec =
> Json.Encode.string (Bug7889.Types.articleCategoryToString rec)
>
>
> decodeArticleCategory : Json.Decode.Decoder Bug7889.Types.ArticleCategory
> decodeArticleCategory =
> Json.Decode.andThen
> (\andThenUnpack ->
> case Bug7889.Types.articleCategoryFromString andThenUnpack of
> Maybe.Just a ->
> Json.Decode.succeed a
>
> Maybe.Nothing ->
> Json.Decode.fail
> (andThenUnpack ++ " is not a valid ArticleCategory")
> )
> Json.Decode.string
diff --ignore-all-space --minimal --new-file --recursive main/cli/generated/Bug7889/Types.elm branch/cli/generated/Bug7889/Types.elm
0a1,43
> module Bug7889.Types exposing (ArticleCategory(..), articleCategoryFromString, articleCategoryToString, articleCategoryVariants)
>
> {-|
>
>
> ## Enum
>
> @docs ArticleCategory, articleCategoryFromString, articleCategoryToString, articleCategoryVariants
>
> -}
>
>
> type ArticleCategory
> = ArticleCategory__Business
> | ArticleCategory__Travel
>
>
> articleCategoryFromString : String -> Maybe ArticleCategory
> articleCategoryFromString value =
> case value of
> "Business" ->
> Just ArticleCategory__Business
>
> "Travel" ->
> Just ArticleCategory__Travel
>
> _ ->
> Nothing
>
>
> articleCategoryToString : ArticleCategory -> String
> articleCategoryToString value =
> case value of
> ArticleCategory__Business ->
> "Business"
>
> ArticleCategory__Travel ->
> "Travel"
>
>
> articleCategoryVariants : List ArticleCategory
> articleCategoryVariants =
> [ ArticleCategory__Business, ArticleCategory__Travel ]
|
wolfadex
reviewed
Feb 3, 2026
Comment on lines
+132
to
+136
| |> OpenApi.Config.withInput (bug 7889) | ||
| |> OpenApi.Config.withInput (bug 10398) | ||
| |> OpenApi.Config.withInput (bug 16104) | ||
| |> OpenApi.Config.withInput (bug 22119) | ||
| |> OpenApi.Config.withInput (bug 22530) |
wolfadex
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Grabbing example schemas from https://github.com/OpenAPITools/openapi-generator/issues?q=is%3Aissue%20is%3Aopen%20elm
Draft because the Stripe schema causes insane CPU usage