Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: Remove illogical oneOf definitions #1843

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adamaltman
Copy link
Member

Summary

invoiceTimeShift:
    description: |-
      Shifts issue time and due time of invoices for this subscription.

      This setting overrides plan settings.
      To use plan settings, set this value to `null`.

      To use multiple plans in one subscription,
      all plans must have the same billing period,
      this property enables the customer to subscribe to different plans.
    example: null
    oneOf:
      - $ref: ./InvoiceTimeShift.yaml
      - type: 'null'

Now, let's look at InvoiceTimeShift.yaml (only the first couple of lines):

type:
  - 'object'
  - 'null'

This makes the oneOf illogical for the null value (because it could match either the null part of the oneOf or the InvoiceTimeShift because that is also null. (A bit of a head 🤯 )

Links

Checklist

  • Writing style
  • API design standards

@adamaltman adamaltman requested review from a team as code owners March 24, 2024 13:09
@ashkarpetin ashkarpetin marked this pull request as draft May 28, 2024 19:18
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.

9 participants