Skip to content

Conversation

@miniBill
Copy link
Collaborator

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

@miniBill
Copy link
Collaborator Author

Now the CI correctly fails due to either a bug or a recursive type (investigating now)

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

1 similar comment
@github-actions
Copy link

github-actions bot commented Feb 2, 2026

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

@github-actions

This comment was marked as outdated.

@miniBill miniBill changed the base branch from main to fix-infinite-loop February 2, 2026 14:12
@miniBill miniBill changed the base branch from fix-infinite-loop to remove-workaround February 2, 2026 14:12
@github-actions

This comment was marked as outdated.

@miniBill miniBill changed the base branch from remove-workaround to fix-intersection February 2, 2026 14:24
@miniBill
Copy link
Collaborator Author

miniBill commented Feb 2, 2026

I'm not sure whether to merge the Stripe schema to be honest, it's full of collisions, mostly due to missing additionalFields: false and required: [ ... ].

EDIT: removed the Stripe schema from the PR

Base automatically changed from fix-intersection to main February 2, 2026 15:55
@github-actions

This comment was marked as outdated.

@github-actions
Copy link

github-actions bot commented Feb 2, 2026

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
>         }

@github-actions
Copy link

github-actions bot commented Feb 2, 2026

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
>         }

@github-actions
Copy link

github-actions bot commented Feb 2, 2026

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
>         }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants