Skip to content

Commit

Permalink
http-client-java, remove unused namer module (#4328)
Browse files Browse the repository at this point in the history
History: we originally intend to use m4 prenamer (opt-in via
flag/option) to keep names in SDK same as from Swagger (mostly for
brownfield).

But later we decided to just use `@clientName` in client.tsp to
explicitly do the naming, if backward-compatibility is an issue.

This flag/option is not used by any service.
  • Loading branch information
weidongxu-microsoft authored Sep 4, 2024
1 parent 1dcd5c4 commit b645fb3
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 956 deletions.
1 change: 0 additions & 1 deletion cspell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ words:
- cobertura
- codehaus
- codeql
- collisons
- Contoso
- CORGE
- createsorreplacesresource
Expand Down
5 changes: 0 additions & 5 deletions packages/http-client-java/emitter/src/code-model-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ import {
operationIsMultipart,
operationIsMultipleContentTypes,
} from "./operation-utils.js";
import { PreNamer } from "./prenamer/prenamer.js";
import {
ProcessingCache,
getAccess,
Expand Down Expand Up @@ -265,10 +264,6 @@ export class CodeModelBuilder {

this.processSchemaUsage();

if (this.options.namer) {
this.codeModel = new PreNamer(this.codeModel).init().process();
}

this.deduplicateSchemaName();

return this.codeModel;
Expand Down
5 changes: 0 additions & 5 deletions packages/http-client-java/emitter/src/emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ export interface EmitterOptions {

"skip-special-headers"?: string[];

namer?: boolean;

"generate-samples"?: boolean;
"generate-tests"?: boolean;

Expand Down Expand Up @@ -73,9 +71,6 @@ const EmitterOptionsSchema: JSONSchemaType<EmitterOptions> = {
// header
"skip-special-headers": { type: "array", items: { type: "string" }, nullable: true },

// namer
namer: { type: "boolean", nullable: true, default: false },

// sample and test
"generate-samples": { type: "boolean", nullable: true, default: true },
"generate-tests": { type: "boolean", nullable: true, default: true },
Expand Down
251 changes: 0 additions & 251 deletions packages/http-client-java/emitter/src/prenamer/formatter.ts

This file was deleted.

Loading

0 comments on commit b645fb3

Please sign in to comment.