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

Generated OAS spec need to have require fields for record which has default value in different package #7415

Open
lnash94 opened this issue Nov 27, 2024 · 0 comments

Comments

@lnash94
Copy link
Member

lnash94 commented Nov 27, 2024

Description

Follow the below example :

Steps to Reproduce

This RollingWindow record belongs to a different package packageA

public type RollingWindow record {|
    decimal timeWindow = 60;
    decimal bucketSize = 10;
|};

if we are using it in the service from another package

...
service / on new http:Listener(7080) {
    resource function get Services() returns packageA:RollingWindow[] {
        return [];
    }
}

The generated OAS includes RollingWindow fields as optional fields, but it should be marked as required since we currently cannot map a default value from a different package.

Version

2201.10.0

Environment Details (with versions)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

2 participants