-
Notifications
You must be signed in to change notification settings - Fork 13
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
server: support json object in query parameters for configurations #70
base: master
Are you sure you want to change the base?
server: support json object in query parameters for configurations #70
Conversation
// Pass JSON object as json string | ||
params.put(TmfConfiguration.JSON_STRING_KEY, queryParameters.getParameters().toString()); | ||
} else { | ||
// Convert it to a Map<String, Object> |
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.
We can discuss the removal of the support for the query param map in the TSP to avoid having clients to implement the support for 2 ways of user input. (To be discussed). This would be done in a follow-up PR.
b629159
to
f42d8ec
Compare
5e53655
to
3ca5be9
Compare
.path(CONFIG_INSTANCES_PATH); | ||
|
||
Bundle bundle = Platform.getBundle("org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core.tests"); | ||
IPath defaultPath = new org.eclipse.core.runtime.Path("config/custom-execution-analysis.json"); //$NON-NLS-1$ |
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.
I noticed that the json file name (without the path "config/") is defined at the top of the file, and passed to this function, but still a hardcoded value is used here?
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.
Oh, there is a typo in the file name, as defined at the top of the file, so the json file would not have been found if used. See comment up there.
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.
Good catch. I'll use the constant and fix the typo.
@@ -78,6 +90,11 @@ public class ConfigurationManagerServiceTest extends RestServerTest { | |||
private static final String EXPECTED_CONFIG_DESCRIPTION = "XML Data-driven analysis: " + VALID_NAME; | |||
private static final String PATH_TO_INVALID_PATH = getPath(PATH_INVALID + INVALID_XML_FILE); | |||
private static final String PATH_TO_VALID_PATH = getPath(PATH_VALID + VALID_XML_FILE); | |||
private static final String VALID_JSON_FILENAME = "custome-execution-analysis.json"; |
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.
I think there's a typo: "custome-" vs "custom-"?
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.
Done
Signed-off-by: Bernd Hufmann <[email protected]>
See eclipse-cdt-cloud/trace-server-protocol#103 Also, add test for TmfConfigurationSourceType with schema json object. [Added] Serialize TmfConfigurationSourceType schema as json object Signed-off-by: Bernd Hufmann <[email protected]>
3569358
to
897c200
Compare
This commit also includes the corresponding swagger updates. [Added] support json object in query parameters for configurations Signed-off-by: Bernd Hufmann <[email protected]>
897c200
to
81ddcd2
Compare
PR based on PR #66, which commits are included.
An additional commit is added:
This commit also includes the corresponding swagger updates.
This needs change in Trace Compass: eclipse-tracecompass/org.eclipse.tracecompass#144
Signed-off-by: Bernd Hufmann [email protected]