You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.
Gives following error when two or more sources are used under swaggerSources while generating UI. It works well for single source.
Caused by:
org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method copy() for arguments [build_f1ze0druuyrt748fg165ca1g2$_run_closure2$_closure18$_closure24$_closure25$_closure26@511a0d5d] on task ':generateSwaggerUISource2' of type org.hidetake.gradle.swagger.generator.GenerateSwaggerUI.
To Reproduce:
Use following code, then generate UI
swaggerSources {
source1 {
inputFile = file(<Yaml full path>)
code {
language ='spring'
configFile = file(<config full path>)
components = ['models', 'apis']
dependsOn validation
}
ui {
doLast {
copy {
from "index.html"
into outputDir
}
}
}
}
source2 {
inputFile = file(<Yaml2 fullpath>)
code {
language ='spring'
configFile = file(<config2 full path>)
components = ['apis']
dependsOn validation
}
ui {
doLast {
copy {
from "index.html"
into outputDir
}
}
}
}
}
This seems stale to say the least, but for people coming here from Google, I took the direction of combining multiple files to one before using this plugin.
I opened an issue to suggest the implementation of a $include field which would allow for arbitrary includes of other YAML files.
For now, the workaround I use is an added task to compile the YAML files before using the plugin:
# api.yml/:
get:
responses:
'200':
description: The authentication process was started successfully.content:
application/json:
schema:
$ref: './models.yml#/Response'
Describe the bug
Gives following error when two or more sources are used under swaggerSources while generating UI. It works well for single source.
To Reproduce:
Use following code, then generate UI
Expected behavior:
Should generate working UI for both sources.
Environment
Plugin version:
2.10.0 (tested with latest 2.18.1 also)
Swagger Codegen version: 2.3.1
Gradle version: 4.5.1
Java version: 1.8
OS: Windows 10
The text was updated successfully, but these errors were encountered: