Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-gomes committed May 28, 2020
2 parents f4048fd + 573c751 commit 68fe1ea
Show file tree
Hide file tree
Showing 20 changed files with 335 additions and 37 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>org.omg.sysml</groupId>
<artifactId>sysml-v2-api-client</artifactId>
<version>2020-03-p1</version>
<version>2020-05-rc1</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -49,7 +49,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:

```groovy
compile "org.omg.sysml:sysml-v2-api-client:2020-03-p1"
compile "org.omg.sysml:sysml-v2-api-client:2020-05-rc1"
```

### Others
Expand All @@ -62,7 +62,7 @@ mvn clean package

Then manually install the following JARs:

* `target/sysml-v2-api-client-2020-03-p1.jar`
* `target/sysml-v2-api-client-2020-05-rc1.jar`
* `target/lib/*.jar`

## Getting Started
Expand Down Expand Up @@ -113,6 +113,7 @@ Class | Method | HTTP request | Description
*CommitApi* | [**postCommitByProject**](docs/CommitApi.md#postCommitByProject) | **POST** /projects/{projectId}/commits | Create commit by project
*ElementApi* | [**getElementByProjectCommitId**](docs/ElementApi.md#getElementByProjectCommitId) | **GET** /projects/{projectId}/commits/{commitId}/elements/{elementId} | Get element by project, commit and ID
*ElementApi* | [**getElementsByProjectCommit**](docs/ElementApi.md#getElementsByProjectCommit) | **GET** /projects/{projectId}/commits/{commitId}/elements | Get elements by project and commit
*ElementApi* | [**getRootsByProjectCommit**](docs/ElementApi.md#getRootsByProjectCommit) | **GET** /projects/{projectId}/commits/{commitId}/roots | Get root elements by project and commit
*ProjectApi* | [**getProjectById**](docs/ProjectApi.md#getProjectById) | **GET** /projects/{projectId} | Get project by ID
*ProjectApi* | [**getProjects**](docs/ProjectApi.md#getProjects) | **GET** /projects | Get projects
*ProjectApi* | [**postProject**](docs/ProjectApi.md#postProject) | **POST** /projects | Create project
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'eclipse'
apply plugin: 'java'

group = 'org.omg.sysml'
version = '2020-03-p1'
version = '2020-05-rc1'

buildscript {
repositories {
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "org.omg.sysml",
name := "sysml-v2-api-client",
version := "2020-03-p1",
version := "2020-05-rc1",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
Expand Down
1 change: 1 addition & 0 deletions docs/Element.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**atType** | **String** | | [optional]
**atId** | [**UUID**](UUID.md) | | [optional]
**identifier** | [**UUID**](UUID.md) | | [optional]


Expand Down
71 changes: 69 additions & 2 deletions docs/ElementApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Method | HTTP request | Description
------------- | ------------- | -------------
[**getElementByProjectCommitId**](ElementApi.md#getElementByProjectCommitId) | **GET** /projects/{projectId}/commits/{commitId}/elements/{elementId} | Get element by project, commit and ID
[**getElementsByProjectCommit**](ElementApi.md#getElementsByProjectCommit) | **GET** /projects/{projectId}/commits/{commitId}/elements | Get elements by project and commit
[**getRootsByProjectCommit**](ElementApi.md#getRootsByProjectCommit) | **GET** /projects/{projectId}/commits/{commitId}/roots | Get root elements by project and commit


<a name="getElementByProjectCommitId"></a>
Expand Down Expand Up @@ -65,7 +66,7 @@ No authorization required
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json
- **Accept**: application/ld+json, application/json

### HTTP response details
| Status code | Description | Response headers |
Expand Down Expand Up @@ -131,7 +132,73 @@ No authorization required
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json
- **Accept**: application/ld+json, application/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Ok | - |
**404** | Not found. | - |
**415** | The requested content type is not acceptable. | - |
**500** | Internal server error. | - |
**0** | Unexpected response. | - |

<a name="getRootsByProjectCommit"></a>
# **getRootsByProjectCommit**
> List&lt;Element&gt; getRootsByProjectCommit(projectId, commitId)
Get root elements by project and commit

### Example
```java
// Import classes:
import org.omg.sysml.ApiClient;
import org.omg.sysml.ApiException;
import org.omg.sysml.Configuration;
import org.omg.sysml.models.*;
import org.omg.sysml.api.ElementApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://localhost");

ElementApi apiInstance = new ElementApi(defaultClient);
UUID projectId = new UUID(); // UUID | ID of the project
UUID commitId = new UUID(); // UUID | ID of the commit
try {
List<Element> result = apiInstance.getRootsByProjectCommit(projectId, commitId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ElementApi#getRootsByProjectCommit");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**projectId** | [**UUID**](.md)| ID of the project |
**commitId** | [**UUID**](.md)| ID of the commit |

### Return type

[**List&lt;Element&gt;**](Element.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/ld+json, application/json

### HTTP response details
| Status code | Description | Response headers |
Expand Down
2 changes: 1 addition & 1 deletion docs/Identified.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**identifier** | [**UUID**](UUID.md) | | [optional]
**atId** | [**UUID**](UUID.md) | | [optional]



1 change: 1 addition & 0 deletions docs/Relationship.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**atType** | **String** | | [optional]
**atId** | [**UUID**](UUID.md) | | [optional]
**identifier** | [**UUID**](UUID.md) | | [optional]
**source** | [**List&lt;Identified&gt;**](Identified.md) | | [optional]
**target** | [**List&lt;Identified&gt;**](Identified.md) | | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/RelationshipApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ No authorization required
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json
- **Accept**: application/ld+json, application/json

### HTTP response details
| Status code | Description | Response headers |
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>sysml-v2-api-client</artifactId>
<packaging>jar</packaging>
<name>sysml-v2-api-client</name>
<version>2020-03-p1</version>
<version>2020-05-rc1</version>
<url>https://github.com/openapitools/openapi-generator</url>
<description>OpenAPI Java</description>
<scm>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/omg/sysml/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private void init() {
json = new JSON();

// Set default User-Agent.
setUserAgent("OpenAPI-Generator/2020-03-p1/java");
setUserAgent("OpenAPI-Generator/2020-05-rc1/java");

authentications = new HashMap<String, Authentication>();
}
Expand Down
141 changes: 139 additions & 2 deletions src/main/java/org/omg/sysml/api/ElementApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public okhttp3.Call getElementByProjectCommitIdCall(UUID projectId, UUID commitI
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json"
"application/ld+json", "application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
Expand Down Expand Up @@ -234,7 +234,7 @@ public okhttp3.Call getElementsByProjectCommitCall(UUID projectId, UUID commitId
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json"
"application/ld+json", "application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
Expand Down Expand Up @@ -340,4 +340,141 @@ public okhttp3.Call getElementsByProjectCommitAsync(UUID projectId, UUID commitI
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getRootsByProjectCommit
* @param projectId ID of the project (required)
* @param commitId ID of the commit (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Ok </td><td> - </td></tr>
<tr><td> 404 </td><td> Not found. </td><td> - </td></tr>
<tr><td> 415 </td><td> The requested content type is not acceptable. </td><td> - </td></tr>
<tr><td> 500 </td><td> Internal server error. </td><td> - </td></tr>
<tr><td> 0 </td><td> Unexpected response. </td><td> - </td></tr>
</table>
*/
public okhttp3.Call getRootsByProjectCommitCall(UUID projectId, UUID commitId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;

// create path and map variables
String localVarPath = "/projects/{projectId}/commits/{commitId}/roots"
.replaceAll("\\{" + "projectId" + "\\}", localVarApiClient.escapeString(projectId.toString()))
.replaceAll("\\{" + "commitId" + "\\}", localVarApiClient.escapeString(commitId.toString()));

List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/ld+json", "application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}

final String[] localVarContentTypes = {

};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);

String[] localVarAuthNames = new String[] { };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}

@SuppressWarnings("rawtypes")
private okhttp3.Call getRootsByProjectCommitValidateBeforeCall(UUID projectId, UUID commitId, final ApiCallback _callback) throws ApiException {

// verify the required parameter 'projectId' is set
if (projectId == null) {
throw new ApiException("Missing the required parameter 'projectId' when calling getRootsByProjectCommit(Async)");
}

// verify the required parameter 'commitId' is set
if (commitId == null) {
throw new ApiException("Missing the required parameter 'commitId' when calling getRootsByProjectCommit(Async)");
}


okhttp3.Call localVarCall = getRootsByProjectCommitCall(projectId, commitId, _callback);
return localVarCall;

}

/**
* Get root elements by project and commit
*
* @param projectId ID of the project (required)
* @param commitId ID of the commit (required)
* @return List&lt;Element&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Ok </td><td> - </td></tr>
<tr><td> 404 </td><td> Not found. </td><td> - </td></tr>
<tr><td> 415 </td><td> The requested content type is not acceptable. </td><td> - </td></tr>
<tr><td> 500 </td><td> Internal server error. </td><td> - </td></tr>
<tr><td> 0 </td><td> Unexpected response. </td><td> - </td></tr>
</table>
*/
public List<Element> getRootsByProjectCommit(UUID projectId, UUID commitId) throws ApiException {
ApiResponse<List<Element>> localVarResp = getRootsByProjectCommitWithHttpInfo(projectId, commitId);
return localVarResp.getData();
}

/**
* Get root elements by project and commit
*
* @param projectId ID of the project (required)
* @param commitId ID of the commit (required)
* @return ApiResponse&lt;List&lt;Element&gt;&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Ok </td><td> - </td></tr>
<tr><td> 404 </td><td> Not found. </td><td> - </td></tr>
<tr><td> 415 </td><td> The requested content type is not acceptable. </td><td> - </td></tr>
<tr><td> 500 </td><td> Internal server error. </td><td> - </td></tr>
<tr><td> 0 </td><td> Unexpected response. </td><td> - </td></tr>
</table>
*/
public ApiResponse<List<Element>> getRootsByProjectCommitWithHttpInfo(UUID projectId, UUID commitId) throws ApiException {
okhttp3.Call localVarCall = getRootsByProjectCommitValidateBeforeCall(projectId, commitId, null);
Type localVarReturnType = new TypeToken<List<Element>>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}

/**
* Get root elements by project and commit (asynchronously)
*
* @param projectId ID of the project (required)
* @param commitId ID of the commit (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Ok </td><td> - </td></tr>
<tr><td> 404 </td><td> Not found. </td><td> - </td></tr>
<tr><td> 415 </td><td> The requested content type is not acceptable. </td><td> - </td></tr>
<tr><td> 500 </td><td> Internal server error. </td><td> - </td></tr>
<tr><td> 0 </td><td> Unexpected response. </td><td> - </td></tr>
</table>
*/
public okhttp3.Call getRootsByProjectCommitAsync(UUID projectId, UUID commitId, final ApiCallback<List<Element>> _callback) throws ApiException {

okhttp3.Call localVarCall = getRootsByProjectCommitValidateBeforeCall(projectId, commitId, _callback);
Type localVarReturnType = new TypeToken<List<Element>>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}
2 changes: 1 addition & 1 deletion src/main/java/org/omg/sysml/api/RelationshipApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public okhttp3.Call getRelationshipsByProjectCommitRelatedElementCall(UUID proje
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json"
"application/ld+json", "application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
Expand Down
Loading

0 comments on commit 68fe1ea

Please sign in to comment.