feat(server): create a person with optional values (#7706)

* feat: create person dto

* chore: open api

* fix: e2e

* fix: web usage
This commit is contained in:
Jason Rasmussen
2024-03-07 15:34:57 -05:00
committed by GitHub
parent f1a8e385e9
commit 661409bac7
20 changed files with 372 additions and 148 deletions
+8 -4
View File
@@ -22,7 +22,7 @@ Method | HTTP request | Description
# **createPerson**
> PersonResponseDto createPerson()
> PersonResponseDto createPerson(personCreateDto)
@@ -45,9 +45,10 @@ import 'package:openapi/api.dart';
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = PersonApi();
final personCreateDto = PersonCreateDto(); // PersonCreateDto |
try {
final result = api_instance.createPerson();
final result = api_instance.createPerson(personCreateDto);
print(result);
} catch (e) {
print('Exception when calling PersonApi->createPerson: $e\n');
@@ -55,7 +56,10 @@ try {
```
### Parameters
This endpoint does not need any parameter.
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**personCreateDto** | [**PersonCreateDto**](PersonCreateDto.md)| |
### Return type
@@ -67,7 +71,7 @@ This endpoint does not need any parameter.
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: application/json
[[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)
+17
View File
@@ -0,0 +1,17 @@
# openapi.model.PersonCreateDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**birthDate** | [**DateTime**](DateTime.md) | Person date of birth. Note: the mobile app cannot currently set the birth date to null. | [optional]
**isHidden** | **bool** | Person visibility | [optional]
**name** | **String** | Person name. | [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)