Skip to content

feat: implement dynamic defaulting feature #419

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

Merged
merged 1 commit into from
May 27, 2021
Merged

Conversation

hbagdi
Copy link
Member

@hbagdi hbagdi commented May 27, 2021

  • file/codegen/main.go and corresponding schema change
    This is to relax the schema of kong entities that are used as input
    for defaults. The relaxation is necessary as otherwise the user will
    have to specify a name in default values. This doesn't have any
    side-effects because the *kong.Type is not used anywhere else in
    Content.
  • file/builder.go file/reader.go
    • defaulter instantiation has been moved inside builder, this feels
      natural, defaulter being instantiated outside the builder seems odd
      and the only explanation is that I simply didn't think through when
      implementing defaulter
    • other changes override the default values that are registered

Fix #89

@hbagdi hbagdi requested review from rainest and mflendrich May 27, 2021 18:34
@hbagdi hbagdi requested a review from a team as a code owner May 27, 2021 18:34
@hbagdi hbagdi force-pushed the feat/configurable-defaults branch from 81e4eeb to 12ffa12 Compare May 27, 2021 18:35
@hbagdi hbagdi force-pushed the feat/configurable-defaults branch from f54ba9f to 18e91b5 Compare May 27, 2021 20:58
- file/codegen/main.go and corresponding schema change
  This is to relax the schema of kong entities that are used as input
  for defaults. The relaxation is necessary as otherwise the user will
  have to specify a name in default values. This doesn't have any
  side-effects because the *kong.Type is not used anywhere else in
  Content.
- file/builder.go file/reader.go
  - defaulter instantiation has been moved inside builder, this feels
    natural, defaulter being instantiated outside the builder seems odd
    and the only explanation is that I simply didn't think through when
    implementing defaulter
  - other changes override the default values that are registered

Fix #89
@hbagdi hbagdi force-pushed the feat/configurable-defaults branch from 18e91b5 to ac8961e Compare May 27, 2021 21:01
@hbagdi hbagdi merged commit a00110d into main May 27, 2021
@hbagdi hbagdi deleted the feat/configurable-defaults branch May 27, 2021 21:02
hbagdi added a commit that referenced this pull request Jun 3, 2021
The refactor introduced in #413 caused a bug in the verify script which
resulted in an outdated schema after #419.
This fixes the schema and the verify script.
hbagdi added a commit that referenced this pull request Jun 3, 2021
The refactor introduced in #413 caused a bug in the verify script which
resulted in an outdated schema after #419.
This fixes the schema and the verify script.
AntoineJac pushed a commit that referenced this pull request Jan 23, 2024
- file/codegen/main.go and corresponding schema change
  This is to relax the schema of kong entities that are used as input
  for defaults. The relaxation is necessary as otherwise the user will
  have to specify a name in default values. This doesn't have any
  side-effects because the *kong.Type is not used anywhere else in
  Content.
- file/builder.go file/reader.go
  - defaulter instantiation has been moved inside builder, this feels
    natural, defaulter being instantiated outside the builder seems odd
    and the only explanation is that I simply didn't think through when
    implementing defaulter
  - other changes override the default values that are registered

Fix #89
AntoineJac pushed a commit that referenced this pull request Jan 23, 2024
The refactor introduced in #413 caused a bug in the verify script which
resulted in an outdated schema after #419.
This fixes the schema and the verify script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature request: add feature to specify default values
3 participants