Commit graph

66 commits

Author SHA1 Message Date
Vincent Biret 892003ef2a
- updates integration test files
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
2021-11-23 11:49:28 -05:00
Vincent Biret f87c2b4951
- updates basic open api integration test for $count
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
2021-11-22 16:03:00 -05:00
Irvine Sunday 226ce62303
Fixes response objects for operations that return single primitive type values (#127)
* Refactor similar code into one function; add fix for responses for primitive types

* Add new param to method and add tests for this

* Update test files

* Address PR review suggestion
2021-11-18 21:27:16 +03:00
Irvine Sunday 03b6000a84
Fixes structured & collection-valued parameters of functions (#133)
* Use content property in collection-valued & structured parameters

Add content property and a media type object to indicate that the parameters are serialized as JSON

* Adds test for CreateParameters

Co-authored-by: Sam Xu <saxu@microsoft.com>
2021-11-18 09:42:34 -08:00
Irvine Sunday da7f51abbf
Resolves response schemas of actions/functions that return collection (#117)
* Update response schema of action/functions that return a collection

* Update Title to use entity type name for the previous segment

* Update test files data appropriately
2021-09-21 12:05:41 +03:00
Irvine Sunday 611067f2d3
[Enhancement] Creates DELETE operation for collection-valued nav. props $ref paths (#112)
* Generate collection nav. prop. entity paths for non-contained nav. props

* Revert previous changes

* Paths with DELETE operations for collection-valued nav. prop. $ref paths

* Don't create extra path for OData Key segment when creating DELETE for $ref

* Update tests

* Update test files

* Minor update to test commit signing

* Another minor update to trigger commit signing

* Update tests appropriately
2021-08-26 22:25:55 +03:00
Irvine Sunday e8ecb37c96
Fix: Expand containment navigation properties (#94)
* Expand all containment nav props; retrieve Media Entity paths prior to expanding

* Update path count to account for expanded containment nav. props.

* Remove containment in sample CSDL

Expanding workbook nav. props leads to many paths  since the containment levels go very deep

* Check for navigability of navigation props

* Comment correction

* Fix broken tests

* Check whether navigation is allowed to a navigation property

* Update tests; add tests to validate navigability of navigation properties

* Update test CSDL doc. with sample NavigationRestrictions annotations

* Concise code; move declaration closer to usage

Co-authored-by: Irvine Sunday <irochand@microsoft.com>
2021-07-09 09:55:55 -07:00
Irvine Sunday b1fed423ab
Describes path operations descriptions from vocabulary annotations (#104)
* Add support for operation descriptions and update tests

* Update tests for Entityset paths operations descriptions

* Code cleanup

* Update test OpenAPI output files.

Co-authored-by: Irvine Sunday <irochand@microsoft.com>
2021-05-04 17:36:03 -07:00
Irvine Sunday 32e673eea0
Fixes potential duplicate operationIds in action/function paths (#98)
* Include EntityType name of ODataKeySegment in Action/Function paths

This helps in preventing potential duplicate operationIds in entity vs entityset functions/actions

* Update tests to validate action/function duplicate operationId fix

* Update test files' action/function operationIds

* Redesign how we retrieve the segment identifiers

* Update test files in line with new segment retrieval redesign

Co-authored-by: Irvine Sunday <irochand@microsoft.com>
2021-04-09 13:38:59 -07:00
Sam Xu b4d3ae36af Add key and operation (function) parameter mapping 2021-02-10 17:45:14 -08:00
Sam Xu dfbf083d53 Push changes from microsoft graph (#86) 2021-02-05 17:42:10 -08:00
edevoogd f6f26df6f2
Fix casing of OpenAPI type "String" for RefPatchOperationHandler and RefPostOperationHandler (#78)
* Fix casing from "String" to "string"

* Fix tests resources

Co-authored-by: Sam Xu <saxu@microsoft.com>
2020-11-30 17:08:41 -08:00
Irvine Sunday 00ed4207fe
Allows schema examples to be optional (#73)
* Adds Links to EntitySet type response objects

* Adds links to the test OpenAPI docs.

* Refactor to use Utils class for nullability checks

* Modify link generator to handle all instances of IEdmEntityType

* Update arguments

* Add new Link properties

* Update test files with links properties

* Rename parameter

* Fix OpenAPI Link generation

* Reorder Parameters generation before Responses

This is important so that the parameters info can be used for Links generation

* Update test files to validate Link fixes

* Fix links and add optional setting

* Update test for Links

* Revert project PlatformTarget

* Add comment

* Add setting for enabling/disabling showing of schema examples

* Add setting to show schema examples to allow tests to pass

* Update test doc. to test disabling of showing of schema examples

* Refactor to remove unnecessary Link creation of collection of entities

* Revert platform target to default - AnyCPU

* Add helpful comment

* Grammar nit fix

Co-authored-by: Irvine Sunday <v-irsund@microsoft.com>
Co-authored-by: Irvine Sunday <irochand@microsoft.com>
2020-07-21 10:54:50 -04:00
Irvine Sunday 9d44019639
Fixes OpenAPI Links and makes them optional (#72)
* Adds Links to EntitySet type response objects

* Adds links to the test OpenAPI docs.

* Refactor to use Utils class for nullability checks

* Modify link generator to handle all instances of IEdmEntityType

* Update arguments

* Add new Link properties

* Update test files with links properties

* Rename parameter

* Fix OpenAPI Link generation

* Reorder Parameters generation before Responses

This is important so that the parameters info can be used for Links generation

* Update test files to validate Link fixes

* Fix links and add optional setting

* Update test for Links

* Revert project PlatformTarget

* Add comment

* Refactor to remove unnecessary Link creation of collection of entities

* Revert platform target to default - AnyCPU

* Add helpful comment

* Grammar nit fix

Co-authored-by: Irvine Sunday <v-irsund@microsoft.com>
Co-authored-by: Irvine Sunday <irochand@microsoft.com>
2020-07-20 09:54:58 -04:00
Sam Xu a7ee00dbf4 Add Delete to containment navigation property and for non-containment navigation property 2020-05-21 10:58:43 -07:00
Irvine Sunday a9278f0e29
Adds Links to EntitySet type Get response objects (#57)
* Adds Links to EntitySet type response objects

* Adds links to the test OpenAPI docs.

* Refactor to use Utils class for nullability checks

* Modify link generator to handle all instances of IEdmEntityType

* Update arguments

* Add new Link properties

* Update test files with links properties

* Rename parameter

Co-authored-by: Irvine Sunday <v-irsund@microsoft.com>
2020-04-15 12:46:28 -07:00
Sam Xu f07876624b Fix the failing test cases 2020-03-29 15:52:16 -07:00
Joe Glombek db8bff25c6 Change all query parameters from "simple" to "form"
"simple" is not supported in query parameters for OpenAPI v3. https://swagger.io/docs/specification/describing-parameters/
2020-03-29 12:54:33 -07:00
Sam Xu 14be0b681d Update all the docs and fix the PoliCheck complain 2020-01-14 16:42:41 -08:00
mur b6f952e08e Adding methods from parent classes in to children classes 2020-01-15 01:20:03 +03:00
Sam Xu 1d7e7e0823 Rename the operationId for operation import 2019-10-10 13:39:51 -07:00
Sam Xu 6377ee0d47 Change the OperationId for function/functionImport 2019-10-10 11:35:39 -07:00
Sam Xu 5e3db101cf Fix issue #42: duplicate path parameters should be prevented 2019-09-25 14:44:02 -07:00
Sam Xu f362c34e31 Fix issue #36: Response object needs type property to identify collections 2019-08-13 13:00:12 -07:00
mispeer 2ff03dd401 Change encryption for fips compliance (#38)
* On Servers where FIPS compliance is enabled, use of MD5 encryption will fail for any usage in .NET

Changing to FIPS compliant SHA256

* Fix typo
2019-08-05 19:52:57 -07:00
mispeer c25df986ac Users/mispeer/serialize nullable references for v2 (#34)
* Introduce setting hidden from UI, such that openApiSpec version 2 has the nullable references properly serialized.

AnyOf does not exist in v2, and those references are currently lost.

* Updating existing tests for nullable/schema areas where v2 and v3 differ

Making them theories to properly test both openApi specifications
Adding relevant yaml, json test files
Modifying code to ensure enums and entities also generate openApi with no anyOf for openApi v2 (not supported)

* Fix "Succeeded" typo in output for util

Fix tab spacing in util
Add version setting in util with documentation

* Remove tabs

* Refactor tests to take SpecVersion directly in InlineData

Modify 2 existing tests to test json schema generation by passed spec version
2019-06-19 14:27:48 -07:00
Michael Speer db3c3e886c Fix issue #29: Action responses not serialized the return type 2019-05-10 13:52:52 -07:00
Sam Xu 37f49c4e3d Add test cases for multiple schemas edm model 2019-05-10 10:42:10 -07:00
Sam Xu 3a1e56b25c Change the operationId generate rule for edm operation 2019-03-27 16:06:31 -07:00
Sam Xu c249cc53f3 update the reference and fix the failed test cases 2019-02-27 10:22:37 -08:00
Brecht Debaere 5a4b5a4597 Update test JSON files. 2019-02-27 09:14:58 -08:00
Sam Xu 4a22d78201 Fix the failed test cases 2019-02-05 10:03:42 -08:00
Sam Xu afe038f1a4 Modify the unit test owing to add the style in the parameter 2018-10-12 11:30:28 -07:00
Sam Xu b5b18ae565 Fix the failed test cases 2018-09-21 12:51:30 -07:00
Sam Xu eefdb23e0e Fix the failed test cases 2018-09-19 10:21:14 -07:00
Sam Xu f9e3763500 Clean the codes and add the example to the components 2018-09-18 16:28:44 -07:00
Sam Xu 5348ea25f2 Modify the codes 2018-09-18 14:35:57 -07:00
Sam Xu cecf114328 Modify the path related codes 2018-09-17 13:07:07 -07:00
Sam Xu b0cc50d59f Modify the ODataPath generator process 2018-09-14 10:24:12 -07:00
Sam Xu e4d8bf03d8 fix the problem about Query options should be the same for a resource 2018-09-11 17:22:39 -07:00
Sam Xu 5a2a2af9ae Change the oneOf to anyOf for Double/Single/Int64 2018-08-29 10:30:21 -07:00
Sam Xu 0f8b01df3e refactor the operation handler 2018-08-28 15:47:44 -07:00
Sam Xu 13ca340cc0 refactor for the capabilities and modify the test cases 2018-08-23 17:27:14 -07:00
Sam Xu 55f8619027 Add the entity type name prefix for Id key 2018-08-16 11:54:05 -07:00
Sam Xu 1b8d685dc7 Merge Graph changes into Master branch 2018-08-08 10:18:01 -07:00
Sam Xu 69431503c5 Make OperationId output by default and use the Camel Case format 2018-01-24 17:16:55 -08:00
Sam Xu d7f6991914 modify NavigationRestrictions and add the unit tests 2018-01-22 15:20:29 -08:00
Sam Xu 6b965f5af2 modify to return the collection of entity type for the GET entity operation 2018-01-19 09:55:43 -08:00
Sam Xu e3e5f5d465 fix the response schema type as object 2018-01-18 19:19:41 -08:00
Sam Xu a9a68fb662 modify the operation and parameter generator to use the capabilites 2018-01-18 18:20:02 -08:00