Commit Graph

56 Commits

Author SHA1 Message Date
João Rafael
85d5477039
BugFix (#944): Add HTTP prefix to URLs in RestApiPlugin and RapidApiPlugin (#1266)
Also, add null check before adding HTTP prefix. This avoids null pointer exceptions and lets the UriBuilder deal with it
2020-10-19 12:19:04 +05:30
dependabot[bot]
43f1478d81
Bump junit in /app/server/appsmith-plugins/restApiPlugin (#1164)
Bumps [junit](https://github.com/junit-team/junit4) from 4.11 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.11.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.11...r4.13.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-13 14:32:28 +05:30
Shrikant Sharat Kandula
6c7e45d010
Add a connection type variable for Plugin implementations (#531)
* Add a connection type variable for Plugin implementations

This type variable is intended to represent the type of the
connection object, if any, that the plugin will use. This will
help make the implementations more robust by leveraging Java's
type checking instead of rudimentary type casts over the
connection objects.

* Fix missing typevar usage
2020-09-14 20:36:47 +05:30
Shrikant Sharat Kandula
3e1522628f
Fix numbers being converted to floats in JSON Post body (#241) 2020-08-11 14:07:34 +05:30
Shrikant Sharat Kandula
b511c3ada9
Change return type of plugin execution to be more specific (#247) 2020-08-10 14:41:32 +05:30
Trisha Anand
8734067cad
Resolving the dependabot vulnerabilities. (#69) 2020-07-09 21:12:16 +05:30
Trisha Anand
cd30e36eaa Hacky solve for setting the action execution request in case of failures in URL/HTTP Method/etc. 2020-06-19 23:43:32 +05:30
Trisha Anand
0603da29ee User test - Add request URL and http method to the execution result 2020-06-19 16:24:58 +00:00
Trisha Anand
73757c3425 Merge branch 'release' into feature/acl-spring-object
# Conflicts:
#	.gitignore
#	appsmith-plugins/mongoPlugin/plugin.properties
#	appsmith-plugins/postgresPlugin/plugin.properties
#	appsmith-plugins/rapidApiPlugin/plugin.properties
#	appsmith-plugins/restApiPlugin/plugin.properties
#	appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java
#	appsmith-server/src/main/java/com/appsmith/server/constants/FieldName.java
#	appsmith-server/src/main/java/com/appsmith/server/repositories/ActionRepository.java
#	appsmith-server/src/main/java/com/appsmith/server/services/ActionServiceImpl.java
#	appsmith-server/src/main/java/com/appsmith/server/services/DatasourceContextServiceImpl.java
#	appsmith-server/src/main/java/com/appsmith/server/services/DatasourceServiceImpl.java
#	appsmith-server/src/test/java/com/appsmith/server/services/ActionServiceTest.java
#	appsmith-server/src/test/java/com/appsmith/server/services/ApplicationServiceTest.java
#	appsmith-server/src/test/java/com/appsmith/server/services/LayoutServiceTest.java
#	appsmith-server/src/test/java/com/appsmith/server/services/PageServiceTest.java
#	build.sh
2020-06-12 19:14:31 +05:30
Arpit Mohan
01737b9599 Experimenting with maven-shade-plugin to create a fat-jar of the postgres dependency.
Will have to do this for all plugins. Currently, it's not registering the plugin with the SpringPluginManager
2020-06-10 11:11:23 +00:00
Shrikant Kandula
1ce336257c Mark any 2xx status code in REST API plugin as successful execution. 2020-06-10 10:51:07 +00:00
Arpit Mohan
99e7519550 Handling form data via the field bodyFormData in ActionConfiguration
This is because the client sends us the data for form-data in the form of a list of Property fields with keys and values. This is consistent with how the client stores & renders headers & query parameters as well.
For MediaType application/x-www-form-urlencoded we will use the bodyFormData field.
2020-06-09 05:48:16 +00:00
Arpit Mohan
fb9e9fbf4c Request body and header in Action Execution Response 2020-05-14 02:08:46 +00:00
Trisha Anand
5829a92998 Merge branch 'release' into feature/acl-spring-object
# Conflicts:
#	appsmith-server/src/main/java/com/appsmith/server/services/ActionServiceImpl.java
2020-05-13 23:37:31 +05:30
Shrikant Kandula
9c48f42990 Rename ActionExecutionResult.shouldCacheResponse -> isExecutionSuccess. 2020-05-12 18:25:49 +05:30
Trisha Anand
c43218eea6 Merge branch 'release' into feature/acl-spring-object 2020-05-01 17:05:43 +05:30
Shrikant Kandula
8ea8fb295e Handle 500 when JSON body doesn't make up an object data type. 2020-04-30 13:32:24 +00:00
Trisha Anand
bc99ce9244 Merge branch 'release' into feature/acl-spring-object 2020-04-30 17:50:32 +05:30
Shrikant Kandula
c8e8c9136d Check the value of Content-Type before trying to make an HTTP call. 2020-04-30 16:50:17 +05:30
Shrikant Kandula
50a8bad19e Merge branch 'bug/restapi-test-without-port' into 'release'
Fix testing of REST API datasources fails when no port is set.

See merge request theappsmith/internal-tools-server!307
2020-04-30 06:02:28 +00:00
Shrikant Kandula
be7f1c0a81 Fix testing of REST API datasources fails when no port is set. 2020-04-30 06:02:28 +00:00
Shrikant Kandula
06e85c308f Update form.json for datasource configurations. 2020-04-29 16:25:30 +05:30
Trisha Anand
2d1fe9d8b4 Merge branch 'release' into feature/acl-spring-object
# Conflicts:
#	appsmith-interfaces/src/main/java/com/appsmith/external/models/SSHPrivateKey.java
#	appsmith-server/src/main/java/com/appsmith/server/filters/AclFilter.java
#	appsmith-server/src/main/java/com/appsmith/server/services/CurlImporterService.java
#	appsmith-server/src/test/java/com/appsmith/server/services/CurlImporterServiceTest.java
2020-04-28 18:13:06 +05:30
Trisha Anand
a8f32d8b2a Merge branch 'release' into feature/acl-spring-object
# Conflicts:
#	appsmith-server/src/main/java/com/appsmith/server/services/MarketplaceService.java
2020-04-23 14:45:40 +05:30
Trisha Anand
dacc6a5c9e The header key should be matched to all possible variations : Content-Type, content-type, etc. This fixes that. 2020-04-22 18:13:31 +05:30
Shrikant Kandula
3dfc62034f Merge branch 'feature/datasource-form-config-apis' into 'release'
Add form config JSONs for individual plugins and an API for GETting them.

See merge request theappsmith/internal-tools-server!295
2020-04-21 12:23:23 +00:00
Shrikant Kandula
58c0f94508 Add form config JSONs for individual plugins and an API for GETting them. 2020-04-21 17:42:14 +05:30
Shrikant Kandula
a49ef95d5b Fix 500 on invalid port sent for restapi plugin test request. 2020-04-21 13:40:12 +05:30
Trisha Anand
6be0b7ae23 Merge branch 'release' into feature/acl-spring-object
# Conflicts:
#	appsmith-server/pom.xml
#	appsmith-server/src/main/java/com/appsmith/server/migrations/DatabaseChangelog.java
#	appsmith-server/src/main/java/com/appsmith/server/repositories/BaseRepositoryImpl.java
#	appsmith-server/src/main/java/com/appsmith/server/services/LayoutActionServiceImpl.java
#	appsmith-server/src/test/java/com/appsmith/server/services/OrganizationServiceTest.java
2020-04-20 18:13:55 +05:30
Arpit Mohan
46879fae2b Committing the plugin.properties to let us run the code from IntelliJ 2020-04-17 13:35:07 +05:30
Shrikant Kandula
08b7f51d5d Datasource API cleanup and better error reporting 2020-04-17 07:27:56 +00:00
Shrikant Kandula
2dbf9d1c6b Test API for data sources 2020-04-15 10:02:09 +00:00
Shrikant Kandula
abd9235360 Richer plugin validations 2020-04-10 09:59:50 +00:00
Trisha Anand
16742403ec Merge branch 'bug/restapi-data-buffer-limit-exception' into 'release' 2020-04-08 12:11:53 +05:30
Shrikant Kandula
ff6b0ce6bc Increase restapi client buffer size from 256KB to 10MB. 2020-04-07 11:20:46 +00:00
Trisha Anand
5911234276 To ensure that special characters like "\n", "\t", etc are preserved in the request json body, convert the json string into object. 2020-04-03 14:27:10 +00:00
Trisha Anand
44d5dccbbb Rest API and Rapid api plugin url encode the query parameters. The Providers returned are sorted by sortOrder in ascending order 2020-03-18 20:35:50 +05:30
Arpit Mohan
249bbbde39 Adding the field shouldCacheResponse to the ActionExecutionResult to make the response caching generic across various plugins 2020-02-25 11:36:02 +00:00
Trisha Anand
2e11a5c2d5 Added datasource configuration to the provider to support the provider level configurations in rapid api 2020-02-14 06:32:34 +00:00
Trisha Anand
d3769bad62 In case of duplicate key, send the application error code instead of http error code so that frontend can handle the duplicate key error gracefully 2020-01-29 10:22:21 +00:00
Trisha Anand
d1705a1931 Corrected receiving the response from String to byte[] array. This ensures that binary responses can also be handled. Added handling of content type Image. 2020-01-24 07:49:52 +00:00
Trisha Anand
576453639f Converted Exceptions thrown to Appsmith Plugin Exception so that its handled correctly. 2020-01-15 17:59:11 +05:30
Trisha Anand
670ca4cb7e Added log for execute action 2020-01-15 09:13:27 +00:00
Trisha Anand
f4a2a73abe In case of non json results, set the result body as string, otherwise parse the json and then store it as jsonNode 2020-01-14 09:48:43 +00:00
Trisha Anand
71a8936e10 Handles http redirect upto 5 times. In case it exceeds the same, it would error out. 2019-12-23 09:12:15 +00:00
Trisha Anand
31cf94f08e 1. Added datasource validator function in the plugin interface which simply returns true for all the current plugins.
2. Added static method getPluginExecutor as a util function which removes duplicate code from across different files.
2019-11-14 08:50:02 +00:00
Arpit Mohan
aac31235f6 Merge branch 'master' of gitlab.com:theappsmith/internal-tools-server
# Conflicts:
#	appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java
#	appsmith-server/src/main/java/com/appsmith/server/services/ResourceContextServiceImpl.java
2019-11-07 14:28:09 +05:30
Trisha Anand
63c0f07708 Query param handling has been added to Rest API plugin using URIComponentsBuilder 2019-11-06 12:30:56 +00:00
Arpit Mohan
bcda3f0feb Renaming all the references of resource to datasource
This renaming is reflective of the entity and it's potential values in the future.
2019-11-06 16:25:08 +05:30
Arpit Mohan
a61b9ab325 Handling null values in the request body 2019-11-05 12:25:08 +00:00