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

Many properties now are set to required in webconsole.yaml #70

Merged
merged 6 commits into from
Mar 6, 2024

Conversation

ShouheiNishi
Copy link
Contributor

Many properties of objects in webconsole.yaml are defined as optional.
But go field corresponding to many of these does not has omitempty tag.
So, we add these properties are set to required.

@ianchen0119
Copy link
Contributor

Hi @newb1er

Please help to review PR.
Thanks.

@yccodr
Copy link
Contributor

yccodr commented Jan 22, 2024

@ShouheiNish Appreciate your work!

Overall, LGTM.

But there's one more thing, I don't think we need openapitools.json as the generation script (openapi-generator.sh) overrides the configuration.

If you intended to specify the version of openapi-generator-cli, I suppose to bring the config into the script. I'll put another comment on that.

@yccodr
Copy link
Contributor

yccodr commented Jan 22, 2024

@ShouheiNishi Here's my suggestion on the script openapi-generator.sh

#/! /bin/bash

CLI_VER=${CLI_VER:-"6.6.0"}
DOCKER=${DOCKER:-0}

if [[ ${DOCKER} == "1" ]]; then
    CLI="docker run --rm -v ${PWD}:/local -w /local openapitools/openapi-generator-cli:v${CLI_VER}"
else
    CLI="openapi-generator-cli"
    ${CLI} version-manager set "${CLI_VER}"
fi

${CLI} --version
${CLI} generate \
       -i webconsole.yaml \
       -g typescript-axios \
       -o src/api

sed 's/: Time/: Date/g' src/api/api.ts >src/api/api.ts.mod
mv src/api/api.ts.mod src/api/api.ts

I don't have Java runtime on my machine so I turn to the Docker option.

Wait for your comments.

@ShouheiNishi
Copy link
Contributor Author

We openapitools.json and regenerate by openapi-generator-cli 7.2.0.

@yccodr
Copy link
Contributor

yccodr commented Feb 15, 2024

@ShouheiNishi Thanks for your work!

@ianchen0119 @andy89923 Please merge this PR 🙏

@andy89923
Copy link
Contributor

@ShouheiNishi Please help solve the conflicts.

@ShouheiNishi
Copy link
Contributor Author

@ShouheiNishi Please help solve the conflicts.

Fix conflicts.

Copy link
Contributor

@andy89923 andy89923 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tim-ywliu tim-ywliu merged commit 4782ecc into free5gc:main Mar 6, 2024
3 checks passed
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.

5 participants