diff --git a/README.md b/README.md index e9590cb..ed6706b 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,8 @@ You can also sync the git repo on your local machine. -l java \ -o /var/tmp/AdobeSignJavaSdk \ -DdateLibrary=legacy \ - --http-user-agent=AdobeSign_JavaSdk_1_0 + --http-user-agent=AdobeSign_JavaSdk_1_0 \ + --model-package="io.swagger.client.model.agreements" ``` (if you're on Windows, replace the last command with `java -jar modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i json\agreements.json -l java -o c:\temp\AdobeSignJavaSdk -DdateLibrary=legacy --http-user-agent=AdobeSign_JavaSdk_1_0`) diff --git a/json/accounts.json b/json/accounts.json new file mode 100644 index 0000000..545f32e --- /dev/null +++ b/json/accounts.json @@ -0,0 +1,151 @@ +{ + "models": { + "Account": { + "description": "Account resource for the User", + "id": "Account", + "properties": { + "created": { + "format": "date", + "description": "Date when the account was created. This is a server generated attributed and can not be provided in POST/PUT calls. Format would be yyyy-MM-dd'T'HH:mm:ssZ. For example, e.g 2016-02-25T18:46:19Z represents UTC time", + "type": "date", + "required": false + }, + "accountType": { + "description": "The provisioned type of the account. This is a server generated attributed and can not be provided in POST/PUT calls.", + "type": "string", + "required": false, + "enum": [ + "FREE", + "FREE_LEGACY", + "TEAM_TRIAL", + "TEAM", + "TEAM_LEGACY", + "ENTERPRISE_TRIAL", + "ENTERPRISE", + "ENTERPRISE_LEGACY", + "GLOBAL_TRIAL", + "GLOBAL", + "DEVELOPER", + "PRO_DOC_CLOUD", + "TEAM_DOC_CLOUD", + "TRIAL_EXPIRED", + "ANONYMOUS", + "PRO_DOC_CLOUD_MULTI", + "PRO_PLUS_DOC_CLOUD", + "PRO_PLUS_DOC_CLOUD_MULTI" + ] + }, + "name": { + "description": "The name which the account is known. This is a server generated attributed and can not be provided in POST/PUT calls. ", + "type": "string", + "required": false + }, + "modified": { + "format": "date", + "description": "The last date that the account information was updated. This is a server generated attributed and can not be provided in POST/PUT calls. Format would be yyyy-MM-dd'T'HH:mm:ssZ. For example, e.g 2016-02-25T18:46:19Z represents UTC time", + "type": "date", + "required": false + }, + "company": { + "description": "The company associated with the account. This is a server generated attributed and can not be provided in POST/PUT calls. ", + "type": "string", + "required": false + }, + "id": { + "description": "Identifier of the account. This is a server generated attributed and can not be provided in POST/PUT calls. ", + "type": "string", + "required": false + } + } + } + }, + "apiVersion": "6.0.0", + "swaggerVersion": "1.2", + "basePath": "https://secure.au1.echosign.com/api/rest/v6", + "apis": [ + { + "path": "/accounts/{accountId}", + "operations": [ + { + "summary": "Retrieves the information for an account.", + "notes": null, + "nickname": "getAccount", + "produces": [ + "application/json" + ], + "authorizations": { + "oauth2": [ + { + "scope": "user_read" + } + ] + }, + "errorResponses": [ + { + "reason": "INVALID_ON_BEHALF_OF_USER_HEADER: Value provided in x-on-behalf-Of-user header is in invalid format.", + "code": "400" + }, + { + "reason": "INVALID_X_API_USER_HEADER: Value provided in x-api-user header is in invalid format.", + "code": "400" + }, + { + "reason": "INVALID_ACCESS_TOKEN: Access token provided is invalid or has expired.", + "code": "401" + }, + { + "reason": "INVALID_ON_BEHALF_OF_USER: Invalid user ID or email provided in x-on-behalf-of-user header.", + "code": "401" + }, + { + "reason": "INVALID_USER: Invalid user ID or email provided in x-user header.", + "code": "401" + }, + { + "reason": "NO_AUTHORIZATION_HEADER: Authorization header not provided.", + "code": "401" + }, + { + "reason": "PERMISSION_DENIED: The API caller does not have the permission to execute this operation.", + "code": "403" + }, + { + "reason": "MISC_SERVER_ERROR: Some miscellaneous error has occurred.", + "code": "500" + } + ], + "httpMethod": "GET", + "type": "Account", + "parameters": [ + { + "paramType": "header", + "name": "Authorization", + "description": "An OAuth Access Token with scopes:in the format 'Bearer {accessToken}'.", + "type": "string", + "required": true + }, + { + "paramType": "header", + "name": "x-api-user", + "description": "The userId or email of API caller using the account or group token in the format userid:{userId} OR email:{email}. If it is not specified, then the caller is inferred from the token.", + "type": "string", + "required": false + }, + { + "paramType": "path", + "name": "accountId", + "description": "The account identifier.", + "type": "string", + "required": true + } + ], + "order": 35 + } + ] + } + ], + "resourcePath": "/accounts", + "produces": [ + "application/json" + ] +} diff --git a/json/agreements.json b/json/agreements.json index 184c5d2..5d32a46 100644 --- a/json/agreements.json +++ b/json/agreements.json @@ -1,6990 +1,8840 @@ - { - "apiVersion":"6.0.0" - ,"swaggerVersion":"1.2" - ,"basePath":"/api/rest/v6" - ,"resourcePath":"/agreements" - ,"produces": - ["application/json","application/pdf","text/csv" - ] - ,"apis": - [ - { - "path":"/agreements" - ,"operations": - [ - { - "httpMethod":"POST" - ,"summary":"Creates an agreement. Sends it out for signatures, and returns the agreementID in the response to the client." - ,"notes":"This is a primary endpoint which is used to create a new agreement. An agreement can be created using transientDocument, libraryDocument or a URL. You can create an agreement in one of the 3 mentioned states: a) DRAFT<\/b> - to incrementally build the agreement before sending out, b) AUTHORING<\/b> - to add/edit form fields in the agreement, c) IN_PROCESS<\/b> - to immediately send the agreement. You can use the PUT /agreements/{agreementId}/state endpoint to transition an agreement between the above mentioned states. An allowed transition would follow the following sequence: DRAFT -> AUTHORING -> IN_PROCESS -> CANCELLED." - ,"type":"AgreementCreationResponse" - ,"nickname":"createAgreement" - ,"order":6 - ,"produces": - ["application/json" - ] - ,"authorizations": - { - "oauth2": - [ - { - "scope":"agreement_write" - } - ] - } - ,"parameters": - [ - { - "name":"Authorization" - ,"description":"An OAuth Access Token<\/a> with scopes: