Skip to content

Commit 89d5724

Browse files
committed
Merge branch 'feature/ST5AS-26'
2 parents 02b2431 + 0f130fd commit 89d5724

39 files changed

+1798
-1136
lines changed

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.3.4
1+
4.1.3

README.md

Lines changed: 23 additions & 20 deletions
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-04
7+
- Package version: 2019-09
88
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
99

1010
## Requirements.
@@ -14,7 +14,7 @@ Python 2.7 and 3.4+
1414
## Installation & Usage
1515
### pip install
1616

17-
If the python package is hosted on Github, you can install directly from Github
17+
If the python package is hosted on a repository, you can install directly using:
1818

1919
```sh
2020
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
@@ -51,13 +51,16 @@ import sysml_v2_api_client
5151
from sysml_v2_api_client.rest import ApiException
5252
from pprint import pprint
5353

54-
# create an instance of the API class
54+
55+
# Defining host is optional and default to http://localhost
56+
configuration.host = "http://localhost"
57+
# Create an instance of the API class
5558
api_instance = sysml_v2_api_client.ElementApi(sysml_v2_api_client.ApiClient(configuration))
56-
element = sysml_v2_api_client.Element() # Element |
59+
body = None # dict(str, object) |
5760

5861
try:
5962
# Add a new element
60-
api_response = api_instance.create_element(element)
63+
api_response = api_instance.create_element(body)
6164
pprint(api_response)
6265
except ApiException as e:
6366
print("Exception when calling ElementApi->create_element: %s\n" % e)
@@ -70,34 +73,34 @@ All URIs are relative to *http://localhost*
7073

7174
Class | Method | HTTP request | Description
7275
------------ | ------------- | ------------- | -------------
73-
*ElementApi* | [**create_element**](docs/ElementApi.md#create_element) | **POST** /element | Add a new element
74-
*ElementApi* | [**get_element**](docs/ElementApi.md#get_element) | **GET** /element/{id} | Get element by its ID
75-
*ElementApi* | [**get_elements**](docs/ElementApi.md#get_elements) | **GET** /element | Get all elements
76-
*ElementApi* | [**get_elements_in_model**](docs/ElementApi.md#get_elements_in_model) | **GET** /element/model/{model_id} | Get all elements in the model
77-
*ModelApi* | [**create_model**](docs/ModelApi.md#create_model) | **POST** /model | Add a new model
78-
*ModelApi* | [**get_model**](docs/ModelApi.md#get_model) | **GET** /model/{id} | Get model by its ID
79-
*ModelApi* | [**get_models**](docs/ModelApi.md#get_models) | **GET** /model | Get all models
80-
*RelationshipApi* | [**create_relationship**](docs/RelationshipApi.md#create_relationship) | **POST** /relationship | Add a new relationship
81-
*RelationshipApi* | [**get_relationship**](docs/RelationshipApi.md#get_relationship) | **GET** /relationship/{id} | Get relationship by its ID
82-
*RelationshipApi* | [**get_relationships**](docs/RelationshipApi.md#get_relationships) | **GET** /relationship | Get all relationships
83-
*RelationshipApi* | [**get_relationships_by_element**](docs/RelationshipApi.md#get_relationships_by_element) | **GET** /relationship/element/{element_id} | Get all relationships with the given element as either source or target
84-
*RelationshipApi* | [**get_relationships_by_source**](docs/RelationshipApi.md#get_relationships_by_source) | **GET** /relationship/source/{source_id} | Get all relationships with the given element as the source
85-
*RelationshipApi* | [**get_relationships_by_target**](docs/RelationshipApi.md#get_relationships_by_target) | **GET** /relationship/target/{target_id} | Get all relationships with the given element as the target
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
8688

8789

8890
## Documentation For Models
8991

9092
- [Element](docs/Element.md)
9193
- [Error](docs/Error.md)
92-
- [Model](docs/Model.md)
94+
- [Identified](docs/Identified.md)
95+
- [Project](docs/Project.md)
9396
- [Relationship](docs/Relationship.md)
97+
- [RelationshipAllOf](docs/RelationshipAllOf.md)
9498

9599

96100
## Documentation For Authorization
97101

98102
All endpoints do not require authorization.
99103

100-
101104
## Author
102105

103106

docs/Element.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**identifier** | **str** | | [optional]
7-
**name** | **str** | | [optional]
8-
**description** | **str** | | [optional]
9-
**parent_model** | **str** | | [optional]
106
**type** | **str** | | [optional]
7+
**containing_project** | [**Identified**](Identified.md) | | [optional]
8+
**identifier** | **str** | | [optional]
119

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

docs/ElementApi.md

Lines changed: 121 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,34 @@ All URIs are relative to *http://localhost*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**create_element**](ElementApi.md#create_element) | **POST** /element | Add a new element
8-
[**get_element**](ElementApi.md#get_element) | **GET** /element/{id} | Get element by its ID
9-
[**get_elements**](ElementApi.md#get_elements) | **GET** /element | Get all elements
10-
[**get_elements_in_model**](ElementApi.md#get_elements_in_model) | **GET** /element/model/{model_id} | Get all elements in the model
7+
[**create_element**](ElementApi.md#create_element) | **POST** /elements | Add a new element
8+
[**get_element**](ElementApi.md#get_element) | **GET** /elements/{identifier} | Get element by its ID
9+
[**get_element_by_project_and_id**](ElementApi.md#get_element_by_project_and_id) | **GET** /projects/{project_identifier}/elements/{element_identifier} | Get element by project ID and its ID
10+
[**get_elements**](ElementApi.md#get_elements) | **GET** /elements | Get all elements
11+
[**get_elements_in_project**](ElementApi.md#get_elements_in_project) | **GET** /projects/{project_identifier}/elements | Get all elements in the project
1112

1213

1314
# **create_element**
14-
> Element create_element(element)
15+
> Element create_element(body)
1516
1617
Add a new element
1718

1819
### Example
20+
1921
```python
2022
from __future__ import print_function
2123
import time
2224
import sysml_v2_api_client
2325
from sysml_v2_api_client.rest import ApiException
2426
from pprint import pprint
2527

26-
# create an instance of the API class
28+
# Create an instance of the API class
2729
api_instance = sysml_v2_api_client.ElementApi()
28-
element = sysml_v2_api_client.Element() # Element |
30+
body = None # dict(str, object) |
2931

3032
try:
3133
# Add a new element
32-
api_response = api_instance.create_element(element)
34+
api_response = api_instance.create_element(body)
3335
pprint(api_response)
3436
except ApiException as e:
3537
print("Exception when calling ElementApi->create_element: %s\n" % e)
@@ -39,7 +41,7 @@ except ApiException as e:
3941

4042
Name | Type | Description | Notes
4143
------------- | ------------- | ------------- | -------------
42-
**element** | [**Element**](Element.md)| |
44+
**body** | [**dict(str, object)**](object.md)| |
4345

4446
### Return type
4547

@@ -54,28 +56,37 @@ No authorization required
5456
- **Content-Type**: application/json
5557
- **Accept**: application/json
5658

59+
### HTTP response details
60+
| Status code | Description | Response headers |
61+
|-------------|-------------|------------------|
62+
**201** | Created | - |
63+
**415** | The requested content type is not acceptable. | - |
64+
**500** | Internal server error. | - |
65+
**0** | Unexpected response. | - |
66+
5767
[[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)
5868

5969
# **get_element**
60-
> Element get_element(id)
70+
> Element get_element(identifier)
6171
6272
Get element by its ID
6373

6474
### Example
75+
6576
```python
6677
from __future__ import print_function
6778
import time
6879
import sysml_v2_api_client
6980
from sysml_v2_api_client.rest import ApiException
7081
from pprint import pprint
7182

72-
# create an instance of the API class
83+
# Create an instance of the API class
7384
api_instance = sysml_v2_api_client.ElementApi()
74-
id = 'id_example' # str | ID of the element
85+
identifier = 'identifier_example' # str | ID of the element
7586

7687
try:
7788
# Get element by its ID
78-
api_response = api_instance.get_element(id)
89+
api_response = api_instance.get_element(identifier)
7990
pprint(api_response)
8091
except ApiException as e:
8192
print("Exception when calling ElementApi->get_element: %s\n" % e)
@@ -85,7 +96,7 @@ except ApiException as e:
8596

8697
Name | Type | Description | Notes
8798
------------- | ------------- | ------------- | -------------
88-
**id** | **str**| ID of the element |
99+
**identifier** | **str**| ID of the element |
89100

90101
### Return type
91102

@@ -100,6 +111,73 @@ No authorization required
100111
- **Content-Type**: Not defined
101112
- **Accept**: application/json
102113

114+
### HTTP response details
115+
| Status code | Description | Response headers |
116+
|-------------|-------------|------------------|
117+
**200** | Ok | - |
118+
**404** | Not found. | - |
119+
**415** | The requested content type is not acceptable. | - |
120+
**500** | Internal server error. | - |
121+
**0** | Unexpected response. | - |
122+
123+
[[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)
124+
125+
# **get_element_by_project_and_id**
126+
> Element get_element_by_project_and_id(project_identifier, element_identifier)
127+
128+
Get element by project ID and its ID
129+
130+
### Example
131+
132+
```python
133+
from __future__ import print_function
134+
import time
135+
import sysml_v2_api_client
136+
from sysml_v2_api_client.rest import ApiException
137+
from pprint import pprint
138+
139+
# Create an instance of the API class
140+
api_instance = sysml_v2_api_client.ElementApi()
141+
project_identifier = 'project_identifier_example' # str | ID of the project
142+
element_identifier = 'element_identifier_example' # str | ID of the element
143+
144+
try:
145+
# Get element by project ID and its ID
146+
api_response = api_instance.get_element_by_project_and_id(project_identifier, element_identifier)
147+
pprint(api_response)
148+
except ApiException as e:
149+
print("Exception when calling ElementApi->get_element_by_project_and_id: %s\n" % e)
150+
```
151+
152+
### Parameters
153+
154+
Name | Type | Description | Notes
155+
------------- | ------------- | ------------- | -------------
156+
**project_identifier** | **str**| ID of the project |
157+
**element_identifier** | **str**| ID of the element |
158+
159+
### Return type
160+
161+
[**Element**](Element.md)
162+
163+
### Authorization
164+
165+
No authorization required
166+
167+
### HTTP request headers
168+
169+
- **Content-Type**: Not defined
170+
- **Accept**: application/json
171+
172+
### HTTP response details
173+
| Status code | Description | Response headers |
174+
|-------------|-------------|------------------|
175+
**200** | Ok | - |
176+
**404** | Not found. | - |
177+
**415** | The requested content type is not acceptable. | - |
178+
**500** | Internal server error. | - |
179+
**0** | Unexpected response. | - |
180+
103181
[[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)
104182

105183
# **get_elements**
@@ -108,14 +186,15 @@ No authorization required
108186
Get all elements
109187

110188
### Example
189+
111190
```python
112191
from __future__ import print_function
113192
import time
114193
import sysml_v2_api_client
115194
from sysml_v2_api_client.rest import ApiException
116195
from pprint import pprint
117196

118-
# create an instance of the API class
197+
# Create an instance of the API class
119198
api_instance = sysml_v2_api_client.ElementApi()
120199

121200
try:
@@ -142,38 +221,47 @@ No authorization required
142221
- **Content-Type**: Not defined
143222
- **Accept**: application/json
144223

224+
### HTTP response details
225+
| Status code | Description | Response headers |
226+
|-------------|-------------|------------------|
227+
**200** | Ok | - |
228+
**415** | The requested content type is not acceptable. | - |
229+
**500** | Internal server error. | - |
230+
**0** | Unexpected response. | - |
231+
145232
[[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)
146233

147-
# **get_elements_in_model**
148-
> Element get_elements_in_model(model_id)
234+
# **get_elements_in_project**
235+
> Element get_elements_in_project(project_identifier)
149236
150-
Get all elements in the model
237+
Get all elements in the project
151238

152239
### Example
240+
153241
```python
154242
from __future__ import print_function
155243
import time
156244
import sysml_v2_api_client
157245
from sysml_v2_api_client.rest import ApiException
158246
from pprint import pprint
159247

160-
# create an instance of the API class
248+
# Create an instance of the API class
161249
api_instance = sysml_v2_api_client.ElementApi()
162-
model_id = 'model_id_example' # str | ID of the model
250+
project_identifier = 'project_identifier_example' # str | ID of the project
163251

164252
try:
165-
# Get all elements in the model
166-
api_response = api_instance.get_elements_in_model(model_id)
253+
# Get all elements in the project
254+
api_response = api_instance.get_elements_in_project(project_identifier)
167255
pprint(api_response)
168256
except ApiException as e:
169-
print("Exception when calling ElementApi->get_elements_in_model: %s\n" % e)
257+
print("Exception when calling ElementApi->get_elements_in_project: %s\n" % e)
170258
```
171259

172260
### Parameters
173261

174262
Name | Type | Description | Notes
175263
------------- | ------------- | ------------- | -------------
176-
**model_id** | **str**| ID of the model |
264+
**project_identifier** | **str**| ID of the project |
177265

178266
### Return type
179267

@@ -188,5 +276,14 @@ No authorization required
188276
- **Content-Type**: Not defined
189277
- **Accept**: application/json
190278

279+
### HTTP response details
280+
| Status code | Description | Response headers |
281+
|-------------|-------------|------------------|
282+
**200** | Ok | - |
283+
**404** | Not found. | - |
284+
**415** | The requested content type is not acceptable. | - |
285+
**500** | Internal server error. | - |
286+
**0** | Unexpected response. | - |
287+
191288
[[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)
192289

docs/Identified.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Identified
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**identifier** | **str** | | [optional]
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+
10+

0 commit comments

Comments
 (0)