Skip to content

Models are not exported to top-level index for model only case #3177

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

Closed
v-jiaodi opened this issue Apr 27, 2025 · 5 comments
Closed

Models are not exported to top-level index for model only case #3177

v-jiaodi opened this issue Apr 27, 2025 · 5 comments
Assignees
Labels
HRLC p0 priority 0

Comments

@v-jiaodi
Copy link
Member

v-jiaodi commented Apr 27, 2025

#3152 (comment)

For model only case we could generate models correctly with proper usage tagged.

@@usage(SAPWidgetService.NonReferencedModel, Usage.input | Usage.output);

model NonReferencedModel {
    @doc("The weight of the widget. This is an int32, but must be greater than zero.")
    prop1: int32;
    @doc("The color of the widget.")
    prop2: string;
}

It would generate the models correctly but the top-level index is not exported. We should include them also for these cases.

/** model interface NonReferencedModel */
export interface NonReferencedModel {
  /** The weight of the widget. This is an int32, but must be greater than zero. */
  prop1: number;
  /** The color of the widget. */
  prop2: string;
}

Image

@MaryGao MaryGao changed the title Support empty model generation for modular Verify empty model generation for Modular Apr 27, 2025
@MaryGao MaryGao changed the title Verify empty model generation for Modular Support empty model generation for Modular Apr 28, 2025
@MaryGao MaryGao changed the title Support empty model generation for Modular Models are not exported to top-level index for model only case Apr 28, 2025
@qiaozha qiaozha added HRLC P1 priority 1 labels May 7, 2025
@MaryGao MaryGao added p0 priority 0 and removed P1 priority 1 labels May 16, 2025
@MaryGao
Copy link
Member

MaryGao commented May 16, 2025

Adjust to p0 task since it has service impact.

@qiaozha
Copy link
Member

qiaozha commented May 16, 2025

@kazrael2119 do you see the models being exposed in index.ts when you test for the api subpath issue in models only case?

@kazrael2119
Copy link
Member

We noticed there's several automation failures with model only cases

Image

@kazrael2119
Copy link
Member

kazrael2119 commented May 28, 2025

#3222
api view:

Image

index.ts

Image

@MaryGao
Copy link
Member

MaryGao commented Jun 4, 2025

Should be fixed now #3222

@MaryGao MaryGao closed this as completed Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HRLC p0 priority 0
Projects
None yet
Development

No branches or pull requests

4 participants