Skip to content

Commit

Permalink
Merge branch 'release/2020-03-rc2'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-gomes committed Mar 22, 2020
2 parents 89d5724 + 3baeba8 commit 652c9ea
Show file tree
Hide file tree
Showing 52 changed files with 2,321 additions and 1,557 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ coverage.xml
*,cover
.hypothesis/
venv/
.venv/
.python-version
.pytest_cache

# Translations
*.mo
Expand Down
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
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ python:
- "3.3"
- "3.4"
- "3.5"
#- "3.5-dev" # 3.5 development branch
#- "nightly" # points to the latest development branch e.g. 3.6-dev
- "3.6"
- "3.7"
- "3.8"
# command to install dependencies
install: "pip install -r requirements.txt"
# command to run tests
Expand Down
56 changes: 30 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ REST/HTTP binding (PSM) for the SysML v2 standard API.
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.0.0
- Package version: 2019-09
- Package version: 2020-03-rc2
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.
Expand All @@ -23,7 +23,7 @@ pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

Then import the package:
```python
import sysml_v2_api_client
import sysml_v2_api_client
```

### Setuptools
Expand Down Expand Up @@ -54,17 +54,20 @@ from pprint import pprint

# Defining host is optional and default to http://localhost
configuration.host = "http://localhost"
# Create an instance of the API class
api_instance = sysml_v2_api_client.ElementApi(sysml_v2_api_client.ApiClient(configuration))
body = None # dict(str, object) |

try:
# Add a new element
api_response = api_instance.create_element(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ElementApi->create_element: %s\n" % e)

# Enter a context with an instance of the API client
with sysml_v2_api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sysml_v2_api_client.CommitApi(api_client)
project_id = 'project_id_example' # str | ID of the project
commit_id = 'commit_id_example' # str | ID of the commit

try:
# Get commit by project and ID
api_response = api_instance.get_commit_by_project_and_id(project_id, commit_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling CommitApi->get_commit_by_project_and_id: %s\n" % e)

```

## Documentation for API Endpoints
Expand All @@ -73,28 +76,29 @@ All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ElementApi* | [**create_element**](docs/ElementApi.md#create_element) | **POST** /elements | Add a new element
*ElementApi* | [**get_element**](docs/ElementApi.md#get_element) | **GET** /elements/{identifier} | Get element by its ID
*ElementApi* | [**get_element_by_project_and_id**](docs/ElementApi.md#get_element_by_project_and_id) | **GET** /projects/{project_identifier}/elements/{element_identifier} | Get element by project ID and its ID
*ElementApi* | [**get_elements**](docs/ElementApi.md#get_elements) | **GET** /elements | Get all elements
*ElementApi* | [**get_elements_in_project**](docs/ElementApi.md#get_elements_in_project) | **GET** /projects/{project_identifier}/elements | Get all elements in the project
*ProjectApi* | [**create_project**](docs/ProjectApi.md#create_project) | **POST** /projects | Add a new project
*ProjectApi* | [**get_project**](docs/ProjectApi.md#get_project) | **GET** /projects/{identifier} | Get project by its ID
*ProjectApi* | [**get_projects**](docs/ProjectApi.md#get_projects) | **GET** /projects | Get all projects
*RelationshipApi* | [**create_relationship**](docs/RelationshipApi.md#create_relationship) | **POST** /relationships | Add a new relationship
*RelationshipApi* | [**get_relationship**](docs/RelationshipApi.md#get_relationship) | **GET** /relationships/{identifier} | Get relationship by its ID
*RelationshipApi* | [**get_relationships**](docs/RelationshipApi.md#get_relationships) | **GET** /relationships | Get all relationships
*RelationshipApi* | [**get_relationships_by_project**](docs/RelationshipApi.md#get_relationships_by_project) | **GET** /projects/{project_identifier}/relationships | Get all relationships in the project
*CommitApi* | [**get_commit_by_project_and_id**](docs/CommitApi.md#get_commit_by_project_and_id) | **GET** /projects/{projectId}/commits/{commitId} | Get commit by project and ID
*CommitApi* | [**get_commits_by_project**](docs/CommitApi.md#get_commits_by_project) | **GET** /projects/{projectId}/commits | Get commits by project
*CommitApi* | [**get_head_commit_by_project**](docs/CommitApi.md#get_head_commit_by_project) | **GET** /projects/{projectId}/head | Get head commit by project
*CommitApi* | [**post_commit_by_project**](docs/CommitApi.md#post_commit_by_project) | **POST** /projects/{projectId}/commits | Create commit by project
*ElementApi* | [**get_element_by_project_commit_id**](docs/ElementApi.md#get_element_by_project_commit_id) | **GET** /projects/{projectId}/commits/{commitId}/elements/{elementId} | Get element by project, commit and ID
*ElementApi* | [**get_elements_by_project_commit**](docs/ElementApi.md#get_elements_by_project_commit) | **GET** /projects/{projectId}/commits/{commitId}/elements | Get elements by project and commit
*ProjectApi* | [**get_project_by_id**](docs/ProjectApi.md#get_project_by_id) | **GET** /projects/{projectId} | Get project by ID
*ProjectApi* | [**get_projects**](docs/ProjectApi.md#get_projects) | **GET** /projects | Get projects
*ProjectApi* | [**post_project**](docs/ProjectApi.md#post_project) | **POST** /projects | Create project
*RelationshipApi* | [**get_relationships_by_project_commit_related_element**](docs/RelationshipApi.md#get_relationships_by_project_commit_related_element) | **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
13 changes: 13 additions & 0 deletions docs/Commit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Commit

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **str** | | [optional]
**changes** | [**list[ElementVersion]**](ElementVersion.md) | | [optional]
**id** | **str** | | [optional]
**previous_commit** | [**Record**](Record.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


247 changes: 247 additions & 0 deletions docs/CommitApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
# sysml_v2_api_client.CommitApi

All URIs are relative to *http://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**get_commit_by_project_and_id**](CommitApi.md#get_commit_by_project_and_id) | **GET** /projects/{projectId}/commits/{commitId} | Get commit by project and ID
[**get_commits_by_project**](CommitApi.md#get_commits_by_project) | **GET** /projects/{projectId}/commits | Get commits by project
[**get_head_commit_by_project**](CommitApi.md#get_head_commit_by_project) | **GET** /projects/{projectId}/head | Get head commit by project
[**post_commit_by_project**](CommitApi.md#post_commit_by_project) | **POST** /projects/{projectId}/commits | Create commit by project


# **get_commit_by_project_and_id**
> Commit get_commit_by_project_and_id(project_id, commit_id)
Get commit by project and ID

### Example

```python
from __future__ import print_function
import time
import sysml_v2_api_client
from sysml_v2_api_client.rest import ApiException
from pprint import pprint

# Enter a context with an instance of the API client
with sysml_v2_api_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = sysml_v2_api_client.CommitApi(api_client)
project_id = 'project_id_example' # str | ID of the project
commit_id = 'commit_id_example' # str | ID of the commit

try:
# Get commit by project and ID
api_response = api_instance.get_commit_by_project_and_id(project_id, commit_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling CommitApi->get_commit_by_project_and_id: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**project_id** | **str**| ID of the project |
**commit_id** | **str**| ID of the commit |

### Return type

[**Commit**](Commit.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: 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. | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **get_commits_by_project**
> Commit get_commits_by_project(project_id)
Get commits by project

### Example

```python
from __future__ import print_function
import time
import sysml_v2_api_client
from sysml_v2_api_client.rest import ApiException
from pprint import pprint

# Enter a context with an instance of the API client
with sysml_v2_api_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = sysml_v2_api_client.CommitApi(api_client)
project_id = 'project_id_example' # str | ID of the project

try:
# Get commits by project
api_response = api_instance.get_commits_by_project(project_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling CommitApi->get_commits_by_project: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**project_id** | [**str**](.md)| ID of the project |

### Return type

[**Commit**](Commit.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: 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. | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **get_head_commit_by_project**
> Commit get_head_commit_by_project(project_id)
Get head commit by project

### Example

```python
from __future__ import print_function
import time
import sysml_v2_api_client
from sysml_v2_api_client.rest import ApiException
from pprint import pprint

# Enter a context with an instance of the API client
with sysml_v2_api_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = sysml_v2_api_client.CommitApi(api_client)
project_id = 'project_id_example' # str | ID of the project

try:
# Get head commit by project
api_response = api_instance.get_head_commit_by_project(project_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling CommitApi->get_head_commit_by_project: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**project_id** | **str**| ID of the project |

### Return type

[**Commit**](Commit.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: 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. | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **post_commit_by_project**
> Commit post_commit_by_project(project_id, body)
Create commit by project

### Example

```python
from __future__ import print_function
import time
import sysml_v2_api_client
from sysml_v2_api_client.rest import ApiException
from pprint import pprint

# Enter a context with an instance of the API client
with sysml_v2_api_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = sysml_v2_api_client.CommitApi(api_client)
project_id = 'project_id_example' # str | ID of the project
body = sysml_v2_api_client.Commit() # Commit |

try:
# Create commit by project
api_response = api_instance.post_commit_by_project(project_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling CommitApi->post_commit_by_project: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**project_id** | [**str**](.md)| ID of the project |
**body** | [**Commit**](Commit.md)| |

### Return type

[**Commit**](Commit.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | Created | - |
**415** | The requested content type is not acceptable. | - |
**500** | Internal server error. | - |
**0** | Unexpected response. | - |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

1 change: 0 additions & 1 deletion docs/Element.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **str** | | [optional]
**containing_project** | [**Identified**](Identified.md) | | [optional]
**identifier** | **str** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
Loading

0 comments on commit 652c9ea

Please sign in to comment.