Skip to content

Commit

Permalink
Merge branch 'release/2021-04'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-gomes committed May 23, 2021
2 parents c9bcc2e + 6c19889 commit f9e0c69
Show file tree
Hide file tree
Showing 28 changed files with 1,095 additions and 283 deletions.
23 changes: 14 additions & 9 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: 2021-03
- Package version: 2021-04
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.
Expand Down Expand Up @@ -63,16 +63,18 @@ configuration = sysml_v2_api_client.Configuration(
# 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)
api_instance = sysml_v2_api_client.BranchApi(api_client)
project_id = 'project_id_example' # str | ID of the project
commit_id = 'commit_id_example' # str | ID of the commit
page_after = 'page_after_example' # str | Page after (optional)
page_before = 'page_before_example' # str | Page before (optional)
page_size = 56 # int | Page size (optional)

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

```

Expand All @@ -82,9 +84,11 @@ All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*BranchApi* | [**get_branches_by_project**](docs/BranchApi.md#get_branches_by_project) | **GET** /projects/{projectId}/branches | Get branches by project
*BranchApi* | [**get_branches_by_project_and_id**](docs/BranchApi.md#get_branches_by_project_and_id) | **GET** /projects/{projectId}/branches/{branchId} | Get branch by project and ID
*BranchApi* | [**post_branch_by_project**](docs/BranchApi.md#post_branch_by_project) | **POST** /projects/{projectId}/branches | Create branch by 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
Expand All @@ -103,8 +107,10 @@ Class | Method | HTTP request | Description

## Documentation For Models

- [Branch](docs/Branch.md)
- [BranchHead](docs/BranchHead.md)
- [BranchOwningProject](docs/BranchOwningProject.md)
- [Commit](docs/Commit.md)
- [CommitContainingProject](docs/CommitContainingProject.md)
- [CompositeConstraint](docs/CompositeConstraint.md)
- [Constraint](docs/Constraint.md)
- [Element](docs/Element.md)
Expand All @@ -115,7 +121,6 @@ Class | Method | HTTP request | Description
- [PrimitiveConstraint](docs/PrimitiveConstraint.md)
- [Project](docs/Project.md)
- [Query](docs/Query.md)
- [Record](docs/Record.md)
- [Relationship](docs/Relationship.md)


Expand Down
14 changes: 14 additions & 0 deletions docs/Branch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Branch

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **str** | | [optional]
**head** | [**BranchHead**](BranchHead.md) | | [optional]
**owning_project** | [**BranchOwningProject**](BranchOwningProject.md) | | [optional]
**id** | **str** | | [optional]
**name** | **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)


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

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**get_branches_by_project**](BranchApi.md#get_branches_by_project) | **GET** /projects/{projectId}/branches | Get branches by project
[**get_branches_by_project_and_id**](BranchApi.md#get_branches_by_project_and_id) | **GET** /projects/{projectId}/branches/{branchId} | Get branch by project and ID
[**post_branch_by_project**](BranchApi.md#post_branch_by_project) | **POST** /projects/{projectId}/branches | Create branch by project


# **get_branches_by_project**
> list[Branch] get_branches_by_project(project_id, page_after=page_after, page_before=page_before, page_size=page_size)
Get branches 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
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = sysml_v2_api_client.Configuration(
host = "http://localhost"
)


# 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.BranchApi(api_client)
project_id = 'project_id_example' # str | ID of the project
page_after = 'page_after_example' # str | Page after (optional)
page_before = 'page_before_example' # str | Page before (optional)
page_size = 56 # int | Page size (optional)

try:
# Get branches by project
api_response = api_instance.get_branches_by_project(project_id, page_after=page_after, page_before=page_before, page_size=page_size)
pprint(api_response)
except ApiException as e:
print("Exception when calling BranchApi->get_branches_by_project: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**project_id** | [**str**](.md)| ID of the project |
**page_after** | **str**| Page after | [optional]
**page_before** | **str**| Page before | [optional]
**page_size** | **int**| Page size | [optional]

### Return type

[**list[Branch]**](Branch.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_branches_by_project_and_id**
> Branch get_branches_by_project_and_id(project_id, branch_id)
Get branch 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
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = sysml_v2_api_client.Configuration(
host = "http://localhost"
)


# 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.BranchApi(api_client)
project_id = 'project_id_example' # str | ID of the project
branch_id = 'branch_id_example' # str | ID of the branch

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

### Parameters

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

### Return type

[**Branch**](Branch.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_branch_by_project**
> Branch post_branch_by_project(project_id, body)
Create branch 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
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = sysml_v2_api_client.Configuration(
host = "http://localhost"
)


# 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.BranchApi(api_client)
project_id = 'project_id_example' # str | ID of the project
body = sysml_v2_api_client.Branch() # Branch |

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

### Parameters

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

### Return type

[**Branch**](Branch.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)

3 changes: 2 additions & 1 deletion docs/Record.md → docs/BranchHead.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Record
# BranchHead

Commit
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# CommitContainingProject
# BranchOwningProject

Project
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
Expand Down
4 changes: 2 additions & 2 deletions docs/Commit.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **str** | | [optional]
**change** | [**list[ElementVersion]**](ElementVersion.md) | | [optional]
**containing_project** | [**CommitContainingProject**](CommitContainingProject.md) | | [optional]
**owning_project** | [**BranchOwningProject**](BranchOwningProject.md) | | [optional]
**id** | **str** | | [optional]
**previous_commit** | [**Record**](Record.md) | | [optional]
**previous_commit** | [**BranchHead**](BranchHead.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)

Expand Down
Loading

0 comments on commit f9e0c69

Please sign in to comment.