Skip to content

Conversation

irvinesunday
Copy link
Contributor

This PR aims to push changes up into the upstream master branch from the forked microsoftgraph repo.
The list of changes are outlined below accompanied with their corresponding issues and PRs made in the forked repo.

  1. Adds root path
  1. Fixes generating of OpenAPI doc. when PrefixEntityTypeNameBeforeKey is enabled
  1. Update /$ref update operation from PATCH to PUT (bug fix)
  1. Limit operations to only include item by key for contained collections and $ref for non-contained collections
  1. Create stream paths
  1. Create media entities
  1. Supports describing AcceptableMediaTypes from annotations
  1. Bumps up Microsoft.OpenAPI library version

irvinesunday and others added 13 commits July 22, 2020 11:40
…-lib

Bumps up Microsoft.OpenAPI library version
* Update root path settings

* Add back option to generate root path

Co-authored-by: Irvine Sunday <irochand@microsoft.com>
…s enabled (#3)

* Update to version 1.0.4

* Remove setting of the keyName for setting PrefixEntityTypeNameBeforeKey

All the dictionary `parameterNameMapping` keys are set with the default parameter keys.

* Add back prefixEntityTypeNameBeforeKey check and add parameterNameMapping check

* Bump up lib versions

Co-authored-by: Sam Xu <saxu@microsoft.com>
Co-authored-by: Irvine Sunday <irochand@microsoft.com>
* Switch $ref operation from PATCH to PUT

See: http://docs.oasis-open.org/odata/odata/v4.0/os/part1-protocol/odata-v4.0-os-part1-protocol.html#_Toc372793759

* Typo fix

* Update tests and test class names appropriately

* Update test resource files appropriately

* Change schema type from 'String' to 'object'

* Delete operations are only valid for non-collection of navProps

* Update ref test and test resource files

* typo fix

Co-authored-by: DeVere Dyett <ddyett@microsoft.com>

* Update test files with additionalProperties object

* Add additionalProperties property to response schema

Co-authored-by: Peter Ombwa <peter.ombwa@microsoft.com>

* Update test files with additionalProperties object in response schema

* Revert return type for response schema

Co-authored-by: Peter Ombwa <peter.ombwa@microsoft.com>

* Revert response schema type to object

* Revert test files response schema; remove additionalProperties property

Co-authored-by: Irvine Sunday <irochand@microsoft.com>
Co-authored-by: DeVere Dyett <ddyett@microsoft.com>
Co-authored-by: Peter Ombwa <peter.ombwa@microsoft.com>
* Add new  constant - ApplicationOctetStream

* Update Edm classes with new media entity path kind and new segment kinds

* Add new OData segments

StreamContent and StreamProperty segments for Media Entity PathKind

* Add new Media Entity operations

Get & Put

* Update operation handler with new media entity operations

Get & Put

* Add new Media Entity path item handler

* Update PathItemHandlerProvider with the new Media Entity path item handler

MediaEntityPathItemHandler

* Update Edm path tests to validate Media Entity paths

* Add tests for StreamProperty & StreamContent OData segments

* Add tests for Media Entity operation handlers

Get & Put operational handlers

* Update OperationHandlerProviderTest with new test fixture for Media Entity

* Add tests for MediaEntityPathItemHandler

* Update PathItemHandlerProviderTests with new test fixture for Media Entity

Co-authored-by: Irvine Sunday <irochand@microsoft.com>
…s and $ref for non-contained collections (#6)

* Fixed non-contained reference collections

* Fix some tests

* Fix tests

* Fixed test

* Updates based on review

Co-authored-by: Darrel Miller <darrel.miller@microsoft.com>
* Generate stream paths for navigation properties

* Refactor out stream path generation into separate function

* Create base class for media entity operations handler

* Add new stream segments conditional checks when creating a NavPropPath

* Add Get and Put operation ids for single-valued nav. prop. paths

* Update handler with support for both Entityset/Singleton stream paths

* Update tests to validate the stream paths updates

* Revert removed modifier

* Remove unnecessary schema definition

* Add application/json content in RequestBody

* Nitpick: format code

Co-authored-by: Irvine Sunday <irochand@microsoft.com>
* Generate stream paths for navigation properties

* Refactor out stream path generation into separate function

* Create base class for media entity operations handler

* Add new stream segments conditional checks when creating a NavPropPath

* Add Get and Put operation ids for single-valued nav. prop. paths

* Update handler with support for both Entityset/Singleton stream paths

* Update tests to validate the stream paths updates

* Revert removed modifier

* Add support for creating a media entity

* Update tests to validate POST operation for creating media entity

* Comment update

* Refactor out common code into private methods

* Remove unnecessary schema definition

* Add application/json content type for RequestBody in media entity POST

* Add application/json content in RequestBody

* Nitpick: format code

* Add application/json content type for media entities RequestBody/Response elements

Co-authored-by: Irvine Sunday <irochand@microsoft.com>
* Generate stream paths for navigation properties

* Refactor out stream path generation into separate function

* Create base class for media entity operations handler

* Add new stream segments conditional checks when creating a NavPropPath

* Add Get and Put operation ids for single-valued nav. prop. paths

* Update handler with support for both Entityset/Singleton stream paths

* Update tests to validate the stream paths updates

* Revert removed modifier

* Add support for creating a media entity

* Update tests to validate POST operation for creating media entity

* Comment update

* Refactor out common code into private methods

* Remove unnecessary schema definition

* Add application/json content type for RequestBody in media entity POST

* Add application/json content in RequestBody

* Nitpick: format code

* Null condition check

* Add application/json content type for media entities RequestBody/Response elements

* Retrieve AcceptableMediaTypes for media entities from annotations

* Add AcceptableMediaTypes OData term constant

* Simplify code

* Update tests to validate fetching of AcceptableMediaTypes from annotations

* Get media stream structural property and nav, property annotations

* Get media type for EntityType instead of EntitySet

* Revert to original code

Functionality refactored out to a separate method

* Create local method for generating custom Edm model

* Correct annotations target reference

* Fix original code

Co-authored-by: Irvine Sunday <irochand@microsoft.com>
* Update media entity operation id generation

* Update tests

* Refactor out operation id generation into abstract class

* Update media entity tests

Co-authored-by: Irvine Sunday <irochand@microsoft.com>
Fixes the condition evaluating whether a path has navigation property segments.

Co-authored-by: Irvine Sunday <irochand@microsoft.com>
@irvinesunday irvinesunday self-assigned this Jan 28, 2021
xuzhg added a commit that referenced this pull request Feb 6, 2021
@xuzhg
Copy link
Contributor

xuzhg commented Feb 6, 2021

Merged.

@xuzhg xuzhg closed this Feb 6, 2021
@unchase
Copy link

unchase commented Feb 6, 2021

Hi, @xuzhg
Can you release this changes into the nuget package? Or set up a pipeline to automatically publish changes?

@xuzhg
Copy link
Contributor

xuzhg commented Feb 6, 2021

@unchase here we are: https://www.nuget.org/packages/Microsoft.OpenApi.OData/1.0.5

Please let us know any problems and issues. Thanks.

@unchase
Copy link

unchase commented Feb 6, 2021

@unchase here we are: https://www.nuget.org/packages/Microsoft.OpenApi.OData/1.0.5

Please let us know any problems and issues. Thanks.

Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants