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

It's hard to use getAllHttpServices if services use versioning #1522

Open
nguerrera opened this issue Jan 10, 2023 · 2 comments
Open

It's hard to use getAllHttpServices if services use versioning #1522

nguerrera opened this issue Jan 10, 2023 · 2 comments
Milestone

Comments

@nguerrera
Copy link
Contributor

nguerrera commented Jan 10, 2023

I naively tried this:

 function emitAllServiceVersions() {
    const [services] = getAllHttpServices(context.program);
    for (const service of services) {
      const versionProjections = buildVersionProjections(context.program, service.namespace);
      for (const versionProjection of versionProjections) {
        const projectedProgram = projectProgram(context.program, versionProjection.projections);
        ...

But then I later used service.operations and realized this is computed before I did the projection.

I see the OpenAPI emitter uses listServices and not getAllHttpServices. Is this what we'd recommend? Is getAllHttpServices a trap in this respect?

@ghost ghost added the Needs Triage label Jan 10, 2023
@markcowl
Copy link
Contributor

  • update docs for this API and listServices to reflect lack of projection support.

@markcowl markcowl added this to the [2023] February milestone Jan 12, 2023
@markcowl
Copy link
Contributor

est: 1

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

No branches or pull requests

3 participants