Skip to content

Commit

Permalink
Merge pull request #1 from ModelDriven/feature/ST5AS-43
Browse files Browse the repository at this point in the history
ST5AS-43
  • Loading branch information
ivan-gomes authored Mar 21, 2020
2 parents 7598fd5 + 655de41 commit b482edb
Show file tree
Hide file tree
Showing 62 changed files with 2,687 additions and 2,000 deletions.
2 changes: 2 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/sbt.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1.3
4.2.3
165 changes: 0 additions & 165 deletions LICENSE

This file was deleted.

44 changes: 23 additions & 21 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>2019-09</version>
<version>2020-03-rc2</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:2019-09"
compile "org.omg.sysml:sysml-v2-api-client:2020-03-rc2"
```

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

Then manually install the following JARs:

* `target/sysml-v2-api-client-2019-09.jar`
* `target/sysml-v2-api-client-2020-03-rc2.jar`
* `target/lib/*.jar`

## Getting Started
Expand All @@ -76,20 +76,21 @@ 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;
import org.omg.sysml.api.CommitApi;

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

ElementApi apiInstance = new ElementApi(defaultClient);
Map<String, Object> body = null; // Map<String, Object> |
CommitApi apiInstance = new CommitApi(defaultClient);
String projectId = "projectId_example"; // String | ID of the project
String commitId = "commitId_example"; // String | ID of the commit
try {
Element result = apiInstance.createElement(body);
Commit result = apiInstance.getCommitByProjectAndId(projectId, commitId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ElementApi#createElement");
System.err.println("Exception when calling CommitApi#getCommitByProjectAndId");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
Expand All @@ -106,28 +107,29 @@ All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ElementApi* | [**createElement**](docs/ElementApi.md#createElement) | **POST** /elements | Add a new element
*ElementApi* | [**getElement**](docs/ElementApi.md#getElement) | **GET** /elements/{identifier} | Get element by its ID
*ElementApi* | [**getElementByProjectAndId**](docs/ElementApi.md#getElementByProjectAndId) | **GET** /projects/{project_identifier}/elements/{element_identifier} | Get element by project ID and its ID
*ElementApi* | [**getElements**](docs/ElementApi.md#getElements) | **GET** /elements | Get all elements
*ElementApi* | [**getElementsInProject**](docs/ElementApi.md#getElementsInProject) | **GET** /projects/{project_identifier}/elements | Get all elements in the project
*ProjectApi* | [**createProject**](docs/ProjectApi.md#createProject) | **POST** /projects | Add a new project
*ProjectApi* | [**getProject**](docs/ProjectApi.md#getProject) | **GET** /projects/{identifier} | Get project by its ID
*ProjectApi* | [**getProjects**](docs/ProjectApi.md#getProjects) | **GET** /projects | Get all projects
*RelationshipApi* | [**createRelationship**](docs/RelationshipApi.md#createRelationship) | **POST** /relationships | Add a new relationship
*RelationshipApi* | [**getRelationship**](docs/RelationshipApi.md#getRelationship) | **GET** /relationships/{identifier} | Get relationship by its ID
*RelationshipApi* | [**getRelationships**](docs/RelationshipApi.md#getRelationships) | **GET** /relationships | Get all relationships
*RelationshipApi* | [**getRelationshipsByProject**](docs/RelationshipApi.md#getRelationshipsByProject) | **GET** /projects/{project_identifier}/relationships | Get all relationships in the project
*CommitApi* | [**getCommitByProjectAndId**](docs/CommitApi.md#getCommitByProjectAndId) | **GET** /projects/{projectId}/commits/{commitId} | Get commit by project and ID
*CommitApi* | [**getCommitsByProject**](docs/CommitApi.md#getCommitsByProject) | **GET** /projects/{projectId}/commits | Get commits by project
*CommitApi* | [**getHeadCommitByProject**](docs/CommitApi.md#getHeadCommitByProject) | **GET** /projects/{projectId}/head | Get head commit by project
*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
*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
*RelationshipApi* | [**getRelationshipsByProjectCommitRelatedElement**](docs/RelationshipApi.md#getRelationshipsByProjectCommitRelatedElement) | **GET** /projects/{projectId}/commits/{commitId}/elements/{relatedElementId}/relationships | Get relationships by project, commit, and related element.


## Documentation for Models

- [Commit](docs/Commit.md)
- [Element](docs/Element.md)
- [ElementIdentity](docs/ElementIdentity.md)
- [ElementVersion](docs/ElementVersion.md)
- [Error](docs/Error.md)
- [Identified](docs/Identified.md)
- [Project](docs/Project.md)
- [Record](docs/Record.md)
- [Relationship](docs/Relationship.md)
- [RelationshipAllOf](docs/RelationshipAllOf.md)


## Documentation for Authorization
Expand Down
2 changes: 1 addition & 1 deletion build-shadow.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
classpath 'com.github.jengelman.gradle.plugins:shadow:5.2.0'
}
}

Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ apply plugin: 'eclipse'
apply plugin: 'java'

group = 'org.omg.sysml'
version = '2019-09'
version = '2020-03-rc2'

buildscript {
repositories {
mavenCentral()
maven { url "https://repo1.maven.org/maven2" }
jcenter()
}
dependencies {
Expand Down Expand Up @@ -105,8 +105,8 @@ dependencies {
compile 'com.google.code.gson:gson:2.8.5'
compile 'io.gsonfire:gson-fire:1.8.3'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
compile 'org.threeten:threetenbp:1.3.5'
testCompile 'junit:junit:4.12'
compile 'org.threeten:threetenbp:1.4.0'
testCompile 'junit:junit:4.13'
}

javadoc {
Expand Down
Loading

0 comments on commit b482edb

Please sign in to comment.