Skip to content

Commit 02b2431

Browse files
committed
Initial commit
0 parents  commit 02b2431

38 files changed

+4566
-0
lines changed

.gitignore

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
47+
venv/
48+
.python-version
49+
50+
# Translations
51+
*.mo
52+
*.pot
53+
54+
# Django stuff:
55+
*.log
56+
57+
# Sphinx documentation
58+
docs/_build/
59+
60+
# PyBuilder
61+
target/
62+
63+
#Ipython Notebook
64+
.ipynb_checkpoints

.openapi-generator-ignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

.openapi-generator/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.3.4

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ref: https://docs.travis-ci.com/user/languages/python
2+
language: python
3+
python:
4+
- "2.7"
5+
- "3.2"
6+
- "3.3"
7+
- "3.4"
8+
- "3.5"
9+
#- "3.5-dev" # 3.5 development branch
10+
#- "nightly" # points to the latest development branch e.g. 3.6-dev
11+
# command to install dependencies
12+
install: "pip install -r requirements.txt"
13+
# command to run tests
14+
script: nosetests

README.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# sysml-v2-api-client
2+
REST/HTTP binding (PSM) for the SysML v2 standard API.
3+
4+
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
5+
6+
- API version: 1.0.0
7+
- Package version: 2019-04
8+
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
9+
10+
## Requirements.
11+
12+
Python 2.7 and 3.4+
13+
14+
## Installation & Usage
15+
### pip install
16+
17+
If the python package is hosted on Github, you can install directly from Github
18+
19+
```sh
20+
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
21+
```
22+
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
23+
24+
Then import the package:
25+
```python
26+
import sysml_v2_api_client
27+
```
28+
29+
### Setuptools
30+
31+
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
32+
33+
```sh
34+
python setup.py install --user
35+
```
36+
(or `sudo python setup.py install` to install the package for all users)
37+
38+
Then import the package:
39+
```python
40+
import sysml_v2_api_client
41+
```
42+
43+
## Getting Started
44+
45+
Please follow the [installation procedure](#installation--usage) and then run the following:
46+
47+
```python
48+
from __future__ import print_function
49+
import time
50+
import sysml_v2_api_client
51+
from sysml_v2_api_client.rest import ApiException
52+
from pprint import pprint
53+
54+
# create an instance of the API class
55+
api_instance = sysml_v2_api_client.ElementApi(sysml_v2_api_client.ApiClient(configuration))
56+
element = sysml_v2_api_client.Element() # Element |
57+
58+
try:
59+
# Add a new element
60+
api_response = api_instance.create_element(element)
61+
pprint(api_response)
62+
except ApiException as e:
63+
print("Exception when calling ElementApi->create_element: %s\n" % e)
64+
65+
```
66+
67+
## Documentation for API Endpoints
68+
69+
All URIs are relative to *http://localhost*
70+
71+
Class | Method | HTTP request | Description
72+
------------ | ------------- | ------------- | -------------
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
86+
87+
88+
## Documentation For Models
89+
90+
- [Element](docs/Element.md)
91+
- [Error](docs/Error.md)
92+
- [Model](docs/Model.md)
93+
- [Relationship](docs/Relationship.md)
94+
95+
96+
## Documentation For Authorization
97+
98+
All endpoints do not require authorization.
99+
100+
101+
## Author
102+
103+
104+
105+

docs/Element.md

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

0 commit comments

Comments
 (0)