Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save chrisobriensp/3aa17a86da774ce1f9d3bdf48fcea835 to your computer and use it in GitHub Desktop.

Select an option

Save chrisobriensp/3aa17a86da774ce1f9d3bdf48fcea835 to your computer and use it in GitHub Desktop.
Updated Open API definition for my functions, providing low level detail of data passed in and returned.
swagger: '2.0'
info:
title: cob-gen-functions.azurewebsites.net
version: 1.0.0
host: cob-gen-functions.azurewebsites.net
basePath: /
schemes:
- https
- http
paths:
/api/FetchUserDetails:
post:
operationId: /api/FetchUserDetails/post
produces:
- application/json
consumes:
- application/json
parameters:
- name: body
in: body
description: Username to lookup
x-ms-summary: Username to lookup
x-ms-visibility: important
required: true
schema:
type: object
properties:
userPrincipalName:
description: Username of the user whose profile should be fetched
type: string
x-ms-summary: UserPrincipalName
x-ms-visibility: important
description: >-
Fetches user data from Office 365/Azure AD for the given username.
responses:
'200':
description: User profile details for the passed username
x-ms-summary: User profile details for the passed username
schema:
type: object
properties:
displayName:
type: string
description: The user's display name
x-ms-summary: DisplayName
officeLocation:
type: string
description: The user's office location
x-ms-summary: OfficeLocation
jobTitle:
type: string
description: The user's job title
x-ms-summary: JobTitle
phone:
type: string
description: The user's phone
x-ms-summary: Phone
security:
- apikeyQuery: []
/api/UpdateUserDetails:
post:
operationId: /api/UpdateUserDetails/post
produces:
- application/json
consumes:
- application/json
parameters:
- name: body
in: body
description: User to update
x-ms-summary: User to update
x-ms-visibility: important
required: true
schema:
type: object
properties:
userPrincipalName:
description: Username of the user whose profile should be updated
type: string
x-ms-summary: UserPrincipalName
x-ms-visibility: important
displayName:
type: string
description: The user's new display name
x-ms-summary: DisplayName
officeLocation:
type: string
description: The user's new office location
x-ms-summary: OfficeLocation
jobTitle:
type: string
description: The user's new job title
x-ms-summary: JobTitle
mobilePhone:
type: string
description: The user's new phone
x-ms-summary: Phone
description: >-
Updates user data in Office 365/Azure AD for the given username.
responses:
'200':
description: User profile update summary
x-ms-summary: User profile update summary
schema:
type: object
properties:
summary:
type: string
description: Summary of results
x-ms-summary: Update summary
security:
- apikeyQuery: []
definitions: {}
securityDefinitions:
apikeyQuery:
type: apiKey
name: code
in: query
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment