-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
fix: typescript docs not being put in a docs directory #22124
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -100,6 +100,8 @@ public class TypeScriptClientCodegen extends AbstractTypeScriptClientCodegen imp | |||
private final DateTimeFormatter iso8601Date = DateTimeFormatter.ISO_DATE; | ||||
private final DateTimeFormatter iso8601DateTime = DateTimeFormatter.ISO_DATE_TIME; | ||||
|
||||
protected String apiDocPath = "docs/"; | ||||
|
||||
public TypeScriptClientCodegen() { | ||||
super(); | ||||
|
||||
|
@@ -400,6 +402,11 @@ public ModelsMap postProcessModels(ModelsMap objs) { | |||
return objs; | ||||
} | ||||
|
||||
@Override | ||||
public String apiDocFileFolder() { | ||||
return (outputFolder + File.separator + apiDocPath); | ||||
} | ||||
|
||||
private List<Map<String, String>> toTsImports(CodegenModel cm, Set<String> imports) { | ||||
List<Map<String, String>> tsImports = new ArrayList<>(); | ||||
for (String im : imports) { | ||||
|
@@ -432,6 +439,8 @@ public void processOpts() { | |||
apiPackage = this.apiPackage + ".apis"; | ||||
testPackage = this.testPackage + ".tests"; | ||||
|
||||
additionalProperties.put("apiDocPath", apiDocPath); | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this even needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not at the moment but when the openapi-generator/modules/openapi-generator/src/main/resources/Java/README.mustache Line 194 in cf2435f
|
||||
|
||||
additionalProperties.putIfAbsent(FRAMEWORK_SWITCH, FRAMEWORKS[0]); | ||||
supportingFiles.add(new SupportingFile("index.mustache", "index.ts")); | ||||
|
||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ agree with this as it means the
apiDocPath
becomes system-agnostic.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, pushed a commit to do this.