-
Notifications
You must be signed in to change notification settings - Fork 99
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
support generation of model from openapi schemas #582
support generation of model from openapi schemas #582
Conversation
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MUzairS15 build checks are failing...
Signed-off-by: MUzairS15 <[email protected]>
ensure correct version is passed. |
utils/component/openapi_generator.go
Outdated
"github.com/meshery/schemas/models/v1beta1/model" | ||
) | ||
|
||
func GenerateFromOpenAPI(resource string) ([]component.ComponentDefinition, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pass the "pkg" that contains info regarding model to generate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still needed?
// @Jougan-0 |
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Name: pkg.GetName(), | ||
DisplayName: manifests.FormatToReadableString(pkg.GetName()), | ||
Category: category.CategoryDefinition{ | ||
Name: "Orchestration & Management", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update
DisplayName: manifests.FormatToReadableString(kind), | ||
Model: model.ModelDefinition{ | ||
SchemaVersion: v1beta1.ModelSchemaVersion, | ||
Version: "v1.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this still hardcoded?
|
||
c := component.ComponentDefinition{ | ||
SchemaVersion: v1beta1.ComponentSchemaVersion, | ||
Version: "v1.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoding appropriate?
Description
This PR fixes #
Notes for Reviewers
Signed commits