Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,19 @@ export abstract class AbstractOperationConverter extends AbstractConverter<
return operationId;
}

// A dot in a method name is parsed as a reference to another file (`import.endpoint`),
// so dotted operation ids must be collapsed into a single name. This runs after
// tokenization so that grouping still sees the individual tokens.
protected sanitizeMethodName(methodName: string): string {
return methodName.includes(".") ? camelCase(methodName) : methodName;
}

protected computeGroupNameFromTagAndOperationId(): GroupNameAndLocation {
const tag = this.operation.tags?.[0];
const methodName = this.evaluateMethodNameFromOperation();

if (tag == null) {
return { method: methodName };
return { method: this.sanitizeMethodName(methodName) };
}

const tagTokens = tokenizeString(tag);
Expand Down Expand Up @@ -372,7 +379,7 @@ export abstract class AbstractOperationConverter extends AbstractConverter<
if (tagIsNotPrefixOfMethodName) {
return {
group: [tag],
method: methodName
method: this.sanitizeMethodName(methodName)
};
}

Expand Down
Loading
Loading