Skip to content

Commit

Permalink
Merge pull request #53 from rhafer/me-expand
Browse files Browse the repository at this point in the history
Add $expand for memberOf to /me
  • Loading branch information
kulmann committed Sep 1, 2022
1 parent 9edbb61 commit de36c45
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Class | Method | HTTP request | Description
*MeDriveRootApi* | [**HomeGetRoot**](docs/MeDriveRootApi.md#homegetroot) | **Get** /me/drive/root | Get root from personal space
*MeDriveRootChildrenApi* | [**HomeGetChildren**](docs/MeDriveRootChildrenApi.md#homegetchildren) | **Get** /me/drive/root/children | Get children from drive
*MeDrivesApi* | [**ListMyDrives**](docs/MeDrivesApi.md#listmydrives) | **Get** /me/drives | Get drives from me
*MeUserApi* | [**MeGet**](docs/MeUserApi.md#meget) | **Get** /me |
*MeUserApi* | [**GetOwnUser**](docs/MeUserApi.md#getownuser) | **Get** /me | Get current user
*UserApi* | [**DeleteUser**](docs/UserApi.md#deleteuser) | **Delete** /users/{user-id} | Delete entity from users
*UserApi* | [**GetUser**](docs/UserApi.md#getuser) | **Get** /users/{user-id} | Get entity from users by key
*UserApi* | [**UpdateUser**](docs/UserApi.md#updateuser) | **Patch** /users/{user-id} | Update entity in users
Expand Down
16 changes: 16 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@ security:
paths:
/me:
get:
operationId: GetOwnUser
parameters:
- description: Expand related entities
explode: false
in: query
name: $expand
required: false
schema:
items:
enum:
- memberOf
type: string
type: array
uniqueItems: true
style: form
responses:
"200":
content:
Expand All @@ -26,6 +41,7 @@ paths:
schema:
$ref: '#/components/schemas/odata.error'
description: error
summary: Get current user
tags:
- me.user
x-ms-docs-operation-type: operation
Expand Down
28 changes: 19 additions & 9 deletions api_me_user.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 15 additions & 10 deletions docs/MeUserApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ All URIs are relative to *https://ocis.ocis-traefik.latest.owncloud.works*

Method | HTTP request | Description
------------- | ------------- | -------------
[**MeGet**](MeUserApi.md#MeGet) | **Get** /me |
[**GetOwnUser**](MeUserApi.md#GetOwnUser) | **Get** /me | Get current user



## MeGet

> User MeGet(ctx).Execute()
## GetOwnUser

> User GetOwnUser(ctx).Expand(expand).Execute()
Get current user

### Example

Expand All @@ -27,27 +27,32 @@ import (
)

func main() {
expand := []string{"Expand_example"} // []string | Expand related entities (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MeUserApi.MeGet(context.Background()).Execute()
resp, r, err := apiClient.MeUserApi.GetOwnUser(context.Background()).Expand(expand).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MeUserApi.MeGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Error when calling `MeUserApi.GetOwnUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `MeGet`: User
fmt.Fprintf(os.Stdout, "Response from `MeUserApi.MeGet`: %v\n", resp)
// response from `GetOwnUser`: User
fmt.Fprintf(os.Stdout, "Response from `MeUserApi.GetOwnUser`: %v\n", resp)
}
```

### Path Parameters

This endpoint does not need any parameter.


### Other Parameters

Other parameters are passed through a pointer to a apiMeGetRequest struct via the builder pattern
Other parameters are passed through a pointer to a apiGetOwnUserRequest struct via the builder pattern


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**expand** | **[]string** | Expand related entities |

### Return type

Expand Down

0 comments on commit de36c45

Please sign in to comment.