Skip to content

Commit 652c9ea

Browse files
committed
Merge branch 'release/2020-03-rc2'
2 parents 89d5724 + 3baeba8 commit 652c9ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2321
-1557
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ coverage.xml
4545
*,cover
4646
.hypothesis/
4747
venv/
48+
.venv/
4849
.python-version
50+
.pytest_cache
4951

5052
# Translations
5153
*.mo

.openapi-generator/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.1.3
1+
4.2.3

.travis.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ python:
66
- "3.3"
77
- "3.4"
88
- "3.5"
9-
#- "3.5-dev" # 3.5 development branch
10-
#- "nightly" # points to the latest development branch e.g. 3.6-dev
9+
- "3.6"
10+
- "3.7"
11+
- "3.8"
1112
# command to install dependencies
1213
install: "pip install -r requirements.txt"
1314
# command to run tests

README.md

+30-26
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ REST/HTTP binding (PSM) for the SysML v2 standard API.
44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

66
- API version: 1.0.0
7-
- Package version: 2019-09
7+
- Package version: 2020-03-rc2
88
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
99

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

2424
Then import the package:
2525
```python
26-
import sysml_v2_api_client
26+
import sysml_v2_api_client
2727
```
2828

2929
### Setuptools
@@ -54,17 +54,20 @@ from pprint import pprint
5454

5555
# Defining host is optional and default to http://localhost
5656
configuration.host = "http://localhost"
57-
# Create an instance of the API class
58-
api_instance = sysml_v2_api_client.ElementApi(sysml_v2_api_client.ApiClient(configuration))
59-
body = None # dict(str, object) |
60-
61-
try:
62-
# Add a new element
63-
api_response = api_instance.create_element(body)
64-
pprint(api_response)
65-
except ApiException as e:
66-
print("Exception when calling ElementApi->create_element: %s\n" % e)
67-
57+
# Enter a context with an instance of the API client
58+
with sysml_v2_api_client.ApiClient(configuration) as api_client:
59+
# Create an instance of the API class
60+
api_instance = sysml_v2_api_client.CommitApi(api_client)
61+
project_id = 'project_id_example' # str | ID of the project
62+
commit_id = 'commit_id_example' # str | ID of the commit
63+
64+
try:
65+
# Get commit by project and ID
66+
api_response = api_instance.get_commit_by_project_and_id(project_id, commit_id)
67+
pprint(api_response)
68+
except ApiException as e:
69+
print("Exception when calling CommitApi->get_commit_by_project_and_id: %s\n" % e)
70+
6871
```
6972

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

7477
Class | Method | HTTP request | Description
7578
------------ | ------------- | ------------- | -------------
76-
*ElementApi* | [**create_element**](docs/ElementApi.md#create_element) | **POST** /elements | Add a new element
77-
*ElementApi* | [**get_element**](docs/ElementApi.md#get_element) | **GET** /elements/{identifier} | Get element by its ID
78-
*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
79-
*ElementApi* | [**get_elements**](docs/ElementApi.md#get_elements) | **GET** /elements | Get all elements
80-
*ElementApi* | [**get_elements_in_project**](docs/ElementApi.md#get_elements_in_project) | **GET** /projects/{project_identifier}/elements | Get all elements in the project
81-
*ProjectApi* | [**create_project**](docs/ProjectApi.md#create_project) | **POST** /projects | Add a new project
82-
*ProjectApi* | [**get_project**](docs/ProjectApi.md#get_project) | **GET** /projects/{identifier} | Get project by its ID
83-
*ProjectApi* | [**get_projects**](docs/ProjectApi.md#get_projects) | **GET** /projects | Get all projects
84-
*RelationshipApi* | [**create_relationship**](docs/RelationshipApi.md#create_relationship) | **POST** /relationships | Add a new relationship
85-
*RelationshipApi* | [**get_relationship**](docs/RelationshipApi.md#get_relationship) | **GET** /relationships/{identifier} | Get relationship by its ID
86-
*RelationshipApi* | [**get_relationships**](docs/RelationshipApi.md#get_relationships) | **GET** /relationships | Get all relationships
87-
*RelationshipApi* | [**get_relationships_by_project**](docs/RelationshipApi.md#get_relationships_by_project) | **GET** /projects/{project_identifier}/relationships | Get all relationships in the project
79+
*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
80+
*CommitApi* | [**get_commits_by_project**](docs/CommitApi.md#get_commits_by_project) | **GET** /projects/{projectId}/commits | Get commits by project
81+
*CommitApi* | [**get_head_commit_by_project**](docs/CommitApi.md#get_head_commit_by_project) | **GET** /projects/{projectId}/head | Get head commit by project
82+
*CommitApi* | [**post_commit_by_project**](docs/CommitApi.md#post_commit_by_project) | **POST** /projects/{projectId}/commits | Create commit by project
83+
*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
84+
*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
85+
*ProjectApi* | [**get_project_by_id**](docs/ProjectApi.md#get_project_by_id) | **GET** /projects/{projectId} | Get project by ID
86+
*ProjectApi* | [**get_projects**](docs/ProjectApi.md#get_projects) | **GET** /projects | Get projects
87+
*ProjectApi* | [**post_project**](docs/ProjectApi.md#post_project) | **POST** /projects | Create project
88+
*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.
8889

8990

9091
## Documentation For Models
9192

93+
- [Commit](docs/Commit.md)
9294
- [Element](docs/Element.md)
95+
- [ElementIdentity](docs/ElementIdentity.md)
96+
- [ElementVersion](docs/ElementVersion.md)
9397
- [Error](docs/Error.md)
9498
- [Identified](docs/Identified.md)
9599
- [Project](docs/Project.md)
100+
- [Record](docs/Record.md)
96101
- [Relationship](docs/Relationship.md)
97-
- [RelationshipAllOf](docs/RelationshipAllOf.md)
98102

99103

100104
## Documentation For Authorization

docs/Commit.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Commit
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**type** | **str** | | [optional]
7+
**changes** | [**list[ElementVersion]**](ElementVersion.md) | | [optional]
8+
**id** | **str** | | [optional]
9+
**previous_commit** | [**Record**](Record.md) | | [optional]
10+
11+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12+
13+

docs/CommitApi.md

+247
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
# sysml_v2_api_client.CommitApi
2+
3+
All URIs are relative to *http://localhost*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**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
8+
[**get_commits_by_project**](CommitApi.md#get_commits_by_project) | **GET** /projects/{projectId}/commits | Get commits by project
9+
[**get_head_commit_by_project**](CommitApi.md#get_head_commit_by_project) | **GET** /projects/{projectId}/head | Get head commit by project
10+
[**post_commit_by_project**](CommitApi.md#post_commit_by_project) | **POST** /projects/{projectId}/commits | Create commit by project
11+
12+
13+
# **get_commit_by_project_and_id**
14+
> Commit get_commit_by_project_and_id(project_id, commit_id)
15+
16+
Get commit by project and ID
17+
18+
### Example
19+
20+
```python
21+
from __future__ import print_function
22+
import time
23+
import sysml_v2_api_client
24+
from sysml_v2_api_client.rest import ApiException
25+
from pprint import pprint
26+
27+
# Enter a context with an instance of the API client
28+
with sysml_v2_api_client.ApiClient() as api_client:
29+
# Create an instance of the API class
30+
api_instance = sysml_v2_api_client.CommitApi(api_client)
31+
project_id = 'project_id_example' # str | ID of the project
32+
commit_id = 'commit_id_example' # str | ID of the commit
33+
34+
try:
35+
# Get commit by project and ID
36+
api_response = api_instance.get_commit_by_project_and_id(project_id, commit_id)
37+
pprint(api_response)
38+
except ApiException as e:
39+
print("Exception when calling CommitApi->get_commit_by_project_and_id: %s\n" % e)
40+
```
41+
42+
### Parameters
43+
44+
Name | Type | Description | Notes
45+
------------- | ------------- | ------------- | -------------
46+
**project_id** | **str**| ID of the project |
47+
**commit_id** | **str**| ID of the commit |
48+
49+
### Return type
50+
51+
[**Commit**](Commit.md)
52+
53+
### Authorization
54+
55+
No authorization required
56+
57+
### HTTP request headers
58+
59+
- **Content-Type**: Not defined
60+
- **Accept**: application/json
61+
62+
### HTTP response details
63+
| Status code | Description | Response headers |
64+
|-------------|-------------|------------------|
65+
**200** | Ok | - |
66+
**404** | Not found. | - |
67+
**415** | The requested content type is not acceptable. | - |
68+
**500** | Internal server error. | - |
69+
**0** | Unexpected response. | - |
70+
71+
[[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)
72+
73+
# **get_commits_by_project**
74+
> Commit get_commits_by_project(project_id)
75+
76+
Get commits by project
77+
78+
### Example
79+
80+
```python
81+
from __future__ import print_function
82+
import time
83+
import sysml_v2_api_client
84+
from sysml_v2_api_client.rest import ApiException
85+
from pprint import pprint
86+
87+
# Enter a context with an instance of the API client
88+
with sysml_v2_api_client.ApiClient() as api_client:
89+
# Create an instance of the API class
90+
api_instance = sysml_v2_api_client.CommitApi(api_client)
91+
project_id = 'project_id_example' # str | ID of the project
92+
93+
try:
94+
# Get commits by project
95+
api_response = api_instance.get_commits_by_project(project_id)
96+
pprint(api_response)
97+
except ApiException as e:
98+
print("Exception when calling CommitApi->get_commits_by_project: %s\n" % e)
99+
```
100+
101+
### Parameters
102+
103+
Name | Type | Description | Notes
104+
------------- | ------------- | ------------- | -------------
105+
**project_id** | [**str**](.md)| ID of the project |
106+
107+
### Return type
108+
109+
[**Commit**](Commit.md)
110+
111+
### Authorization
112+
113+
No authorization required
114+
115+
### HTTP request headers
116+
117+
- **Content-Type**: Not defined
118+
- **Accept**: application/json
119+
120+
### HTTP response details
121+
| Status code | Description | Response headers |
122+
|-------------|-------------|------------------|
123+
**200** | Ok | - |
124+
**404** | Not found. | - |
125+
**415** | The requested content type is not acceptable. | - |
126+
**500** | Internal server error. | - |
127+
**0** | Unexpected response. | - |
128+
129+
[[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)
130+
131+
# **get_head_commit_by_project**
132+
> Commit get_head_commit_by_project(project_id)
133+
134+
Get head commit by project
135+
136+
### Example
137+
138+
```python
139+
from __future__ import print_function
140+
import time
141+
import sysml_v2_api_client
142+
from sysml_v2_api_client.rest import ApiException
143+
from pprint import pprint
144+
145+
# Enter a context with an instance of the API client
146+
with sysml_v2_api_client.ApiClient() as api_client:
147+
# Create an instance of the API class
148+
api_instance = sysml_v2_api_client.CommitApi(api_client)
149+
project_id = 'project_id_example' # str | ID of the project
150+
151+
try:
152+
# Get head commit by project
153+
api_response = api_instance.get_head_commit_by_project(project_id)
154+
pprint(api_response)
155+
except ApiException as e:
156+
print("Exception when calling CommitApi->get_head_commit_by_project: %s\n" % e)
157+
```
158+
159+
### Parameters
160+
161+
Name | Type | Description | Notes
162+
------------- | ------------- | ------------- | -------------
163+
**project_id** | **str**| ID of the project |
164+
165+
### Return type
166+
167+
[**Commit**](Commit.md)
168+
169+
### Authorization
170+
171+
No authorization required
172+
173+
### HTTP request headers
174+
175+
- **Content-Type**: Not defined
176+
- **Accept**: application/json
177+
178+
### HTTP response details
179+
| Status code | Description | Response headers |
180+
|-------------|-------------|------------------|
181+
**200** | Ok | - |
182+
**404** | Not found. | - |
183+
**415** | The requested content type is not acceptable. | - |
184+
**500** | Internal server error. | - |
185+
**0** | Unexpected response. | - |
186+
187+
[[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)
188+
189+
# **post_commit_by_project**
190+
> Commit post_commit_by_project(project_id, body)
191+
192+
Create commit by project
193+
194+
### Example
195+
196+
```python
197+
from __future__ import print_function
198+
import time
199+
import sysml_v2_api_client
200+
from sysml_v2_api_client.rest import ApiException
201+
from pprint import pprint
202+
203+
# Enter a context with an instance of the API client
204+
with sysml_v2_api_client.ApiClient() as api_client:
205+
# Create an instance of the API class
206+
api_instance = sysml_v2_api_client.CommitApi(api_client)
207+
project_id = 'project_id_example' # str | ID of the project
208+
body = sysml_v2_api_client.Commit() # Commit |
209+
210+
try:
211+
# Create commit by project
212+
api_response = api_instance.post_commit_by_project(project_id, body)
213+
pprint(api_response)
214+
except ApiException as e:
215+
print("Exception when calling CommitApi->post_commit_by_project: %s\n" % e)
216+
```
217+
218+
### Parameters
219+
220+
Name | Type | Description | Notes
221+
------------- | ------------- | ------------- | -------------
222+
**project_id** | [**str**](.md)| ID of the project |
223+
**body** | [**Commit**](Commit.md)| |
224+
225+
### Return type
226+
227+
[**Commit**](Commit.md)
228+
229+
### Authorization
230+
231+
No authorization required
232+
233+
### HTTP request headers
234+
235+
- **Content-Type**: application/json
236+
- **Accept**: application/json
237+
238+
### HTTP response details
239+
| Status code | Description | Response headers |
240+
|-------------|-------------|------------------|
241+
**201** | Created | - |
242+
**415** | The requested content type is not acceptable. | - |
243+
**500** | Internal server error. | - |
244+
**0** | Unexpected response. | - |
245+
246+
[[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)
247+

docs/Element.md

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**type** | **str** | | [optional]
7-
**containing_project** | [**Identified**](Identified.md) | | [optional]
87
**identifier** | **str** | | [optional]
98

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

0 commit comments

Comments
 (0)