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

Break up Parameter interface into the different types/formats #63

Closed
andrii-balitskyi opened this issue Aug 22, 2024 · 2 comments · Fixed by #68
Closed

Break up Parameter interface into the different types/formats #63

andrii-balitskyi opened this issue Aug 22, 2024 · 2 comments · Fixed by #68
Assignees

Comments

@andrii-balitskyi
Copy link
Contributor

          Really we need to follow what we did for Property and break it up into the difference types/formats.

But that can be the next PR

Originally posted by @razor-x in #62 (comment)

@andrii-balitskyi
Copy link
Contributor Author

@razor-x should we use interfaces defined for Property something like:

export interface BaseParameter {
  name: string
  isRequired: boolean
  isUndocumented: boolean
  isDeprecated: boolean
  deprecationMessage: string
  description: string
}

export type Parameter =
  | (BaseParameter & StringProperty)
  | (BaseParameter & EnumProperty)
  | (BaseParameter & RecordProperty)
  | (BaseParameter & ListProperty)
  | (BaseParameter & ObjectProperty)
  | (BaseParameter & BooleanProperty)
  | (BaseParameter & DatetimeProperty)
  | (BaseParameter & IdProperty)

@razor-x
Copy link
Collaborator

razor-x commented Aug 23, 2024

@andrii-balitskyi Yes (but we can use the interface extension pattern we already have). I expect the properties / parameters will share a similar structure at first, but they will diverge as we build the docs/sdks since params are about input and properties are about output.

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 a pull request may close this issue.

3 participants