You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
In the types definition that is used for a Ballerina service there is a type which is a union of constants. This type is part of a struct.
public const RESOURCE_KIND_ENVIRONMENT = "Environment";
public const RESOURCE_KIND_PROJECT = "Project";
public const RESOURCE_KIND_COMPONENT = "Component";
public const RESOURCE_KIND_BUILD = "Build";
public const RESOURCE_KIND_DEPLOYABLE_ARTIFACT = "DeployableArtifact";
public const RESOURCE_KIND_DEPLOYMENT = "Deployment";
public type ResourceKind RESOURCE_KIND_ENVIRONMENT|RESOURCE_KIND_PROJECT|RESOURCE_KIND_COMPONENT|RESOURCE_KIND_BUILD|
RESOURCE_KIND_DEPLOYABLE_ARTIFACT|RESOURCE_KIND_DEPLOYMENT;
public type Environment record {
string apiVersion;
RESOURCE_KIND_ENVIRONMENT kind = RESOURCE_KIND_ENVIRONMENT;
Metadata metadata;
EnvironmentSpec spec;
EnvironmentStatus status?;
};
When the OpenAPI tool is used to generate the OpenAPI Spec this type is omitted.
bal openapi -i service.bal
Later this spec is used to generate a client and as a result the resulting types have a missing field
bal openapi -i <spec_location> -o <generate_location> --mode client
public type Environment record {
string apiVersion;
Metadata metadata;
EnvironmentSpec spec;
EnvironmentStatus status?;
};
Currently, the tool won't support the literal value, the tool will support the defined types. In the above scenarios is there a particular reason to add a kind as a literal value, if possible to have a kind with ResourceKind we will map the kind type to the given type.
Description:
In the types definition that is used for a Ballerina service there is a type which is a union of constants. This type is part of a struct.
When the OpenAPI tool is used to generate the OpenAPI Spec this type is omitted.
bal openapi -i service.bal
Later this spec is used to generate a client and as a result the resulting types have a missing field
bal openapi -i <spec_location> -o <generate_location> --mode client
Suggested Labels (optional):
module/openapi-tools
Area/OpenapiToBallerina
Area/BallerinaToOpenapi
The text was updated successfully, but these errors were encountered: