Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,6 @@ src/unit_test_api/components/schema/uniqueitems_validation.py
src/unit_test_api/components/schema/uri_format.py
src/unit_test_api/components/schema/uri_reference_format.py
src/unit_test_api/components/schema/uri_template_format.py
src/unit_test_api/components/schemas/__init__.py
src/unit_test_api/configurations/__init__.py
src/unit_test_api/configurations/api_configuration.py
src/unit_test_api/configurations/schema_configuration.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ src/json_schema_api/components/schema/object_pattern_properties.py
src/json_schema_api/components/schema/object_property_names.py
src/json_schema_api/components/schema/object_unevaluated_properties_false_with_properties.py
src/json_schema_api/components/schema/string_const_string.py
src/json_schema_api/components/schemas/__init__.py
src/json_schema_api/configurations/__init__.py
src/json_schema_api/configurations/api_configuration.py
src/json_schema_api/configurations/schema_configuration.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,6 @@ src/unit_test_api/components/schema/uri_format.py
src/unit_test_api/components/schema/uri_reference_format.py
src/unit_test_api/components/schema/uri_template_format.py
src/unit_test_api/components/schema/uuid_format.py
src/unit_test_api/components/schemas/__init__.py
src/unit_test_api/configurations/__init__.py
src/unit_test_api/configurations/api_configuration.py
src/unit_test_api/configurations/schema_configuration.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ src/this_package/components/schema/__init__.py
src/this_package/components/schema/addition_operator.py
src/this_package/components/schema/operator.py
src/this_package/components/schema/subtraction_operator.py
src/this_package/components/schemas/__init__.py
src/this_package/configurations/__init__.py
src/this_package/configurations/api_configuration.py
src/this_package/configurations/schema_configuration.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ src/this_package/apis/paths/path_with_two_explicit_security.py
src/this_package/apis/tag_to_api.py
src/this_package/apis/tags/__init__.py
src/this_package/apis/tags/default_api.py
src/this_package/components/schemas/__init__.py
src/this_package/components/security_schemes/__init__.py
src/this_package/components/security_schemes/security_scheme_api_key.py
src/this_package/components/security_schemes/security_scheme_bearer_test.py
Expand Down
1 change: 0 additions & 1 deletion samples/client/petstore/python/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,6 @@ src/petstore_api/components/schema/user.py
src/petstore_api/components/schema/uuid_string.py
src/petstore_api/components/schema/whale.py
src/petstore_api/components/schema/zebra.py
src/petstore_api/components/schemas/__init__.py
src/petstore_api/components/security_schemes/__init__.py
src/petstore_api/components/security_schemes/security_scheme_api_key.py
src/petstore_api/components/security_schemes/security_scheme_api_key_query.py
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
issue259_sample1.components.security_schemes.security_scheme_basic
# SecurityScheme Basic

## Description
NetHSM supports Basic Authentication.


## Type
security_schemes.SecuritySchemeType.HTTP

## Scheme
security_schemes.HTTPSchemeType.BASIC

## user_id
Type | Notes
---- | ------
str | Set by the developer

## password
Type | Notes
---- | ------
str | Set by the developer

[[Back to top]](#top) [[Back to Component Security Schemes]](../../../README.md#Component-SecuritySchemes) [[Back to README]](../../../README.md)
103 changes: 103 additions & 0 deletions samples/client/petstore/python/docs/paths/users_user_id/get.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
issue259_sample1.paths.users_user_id.operation
# Operation Method Name

| Method Name | Api Class | Notes |
| ----------- | --------- | ----- |
| users_user_id_get | [DefaultApi](../../apis/tags/default_api.md) | This api is only for tag=default |
| get | ApiForGet | This api is only for this endpoint |
| get | UsersUserID | This api is only for path=/users/{UserID} |

## Table of Contents
- [General Info](#general-info)
- [Arguments](#arguments)
- [Return Types](#return-types)
- [Servers](#servers)
- [Code Sample](#code-sample)

## General Info
| Field | Value |
| ----- | ----- |
| Description | Get user info: name and role. |
| Path | "/users/{UserID}" |
| HTTP Method | get |

## Arguments

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
accept_content_types | typing.Tuple[str] | default is ("application/json", ) | Tells the server the content type(s) that are accepted by the client
server_index | typing.Optional[int] | default is None | Allows one to select a different [server](#servers). If not None, must be one of [0]
stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file
timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client
skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_response.ApiResponseWithoutDeserialization will be returned

## Return Types

HTTP Status Code | Class | Description
------------- | ------------- | -------------
n/a | api_response.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned
200 | [ResponseFor200.ApiResponse](#responsefor200-apiresponse) |

## ResponseFor200

### ResponseFor200 ApiResponse
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
response | urllib3.HTTPResponse | Raw response |
[body](#responsefor200-body) | str | |
headers | Unset | headers were not defined |

### ResponseFor200 Body
Content-Type | Schema
------------ | -------
"application/json" | [content.application_json.Schema](#responsefor200-content-applicationjson-schema)

### Body Details
#### ResponseFor200 content ApplicationJson Schema
issue259_sample1.paths.users_user_id.get.responses.response_200.content.application_json.schema
```
type: schemas.Schema
```

##### validate method
Input Type | Return Type | Notes
------------ | ------------- | -------------
str | str |

## Servers

Set the available servers by defining your used servers in ApiConfiguration.server_info
Then select your server by setting a server index in ApiConfiguration.server_index_info or by
passing server_index in to the endpoint method.
- these servers are the general api servers
- defaults to server_index=0, server.url = https://localhost:8443/api/v1

server_index | Class | Description
------------ | ----- | ------------
0 | [Server0](../../servers/server_0.md) |

## Code Sample

```python
import issue259_sample1
from issue259_sample1.configurations import api_configuration
from issue259_sample1.apis.tags import default_api
from pprint import pprint
used_configuration = api_configuration.ApiConfiguration(
)
# Enter a context with an instance of the API client
with issue259_sample1.ApiClient(used_configuration) as api_client:
# Create an instance of the API class
api_instance = default_api.DefaultApi(api_client)

# example, this endpoint has no required or optional parameters
try:
api_response = api_instance.users_user_id_get()
pprint(api_response)
except issue259_sample1.ApiException as e:
print("Exception when calling DefaultApi->users_user_id_get: %s\n" % e)
```

[[Back to top]](#top)
[[Back to DefaultApi API]](../../apis/tags/default_api.md)
[[Back to Endpoints]](../../../README.md#Endpoints) [[Back to README]](../../../README.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Schema
issue259_sample1.paths.users_user_id.get.responses.response_200.content.application_json.schema
```
type: schemas.Schema
```

## validate method
Input Type | Return Type | Notes
------------ | ------------- | -------------
str | str |
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Schema
issue259_sample1.paths.users_user_id.parameters.parameter_0.schema
```
type: schemas.Schema
```

## validate method
Input Type | Return Type | Notes
------------ | ------------- | -------------
str | str |
26 changes: 26 additions & 0 deletions samples/client/petstore/python/src/issue259_sample1/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# coding: utf-8

# flake8: noqa

"""
NetHSM
No description provided (generated by Openapi JSON Schema Generator https://github.com/openapi-json-schema-tools/openapi-json-schema-generator) # noqa: E501
The version of the OpenAPI document: v1
Generated by: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator
"""

__version__ = "1.0.0"

# import ApiClient
from issue259_sample1.api_client import ApiClient

# import Configuration
from issue259_sample1.configurations.api_configuration import ApiConfiguration

# import exceptions
from issue259_sample1.exceptions import OpenApiException
from issue259_sample1.exceptions import ApiAttributeError
from issue259_sample1.exceptions import ApiTypeError
from issue259_sample1.exceptions import ApiValueError
from issue259_sample1.exceptions import ApiKeyError
from issue259_sample1.exceptions import ApiException
Loading