Commit graph

152 commits

Author SHA1 Message Date
Vincent Biret 00b605f9fc
- renames dollar count segment setting
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
2021-11-23 14:01:38 -05:00
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 5d910fd29b
- adds support for reading annotations for count restrictions for count path
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
2021-11-23 11:37:48 -05:00
Vincent Biret 4093249a19
- adds a setting to globally disable dollar count path items
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
2021-11-23 10:28:01 -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
Vincent Biret 10b99ca357
- updates unit tests for dolarr count fix
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
2021-11-22 15:06:11 -05:00
Vincent Biret 094bf81732
- upgrades dependencies to avoid dependabot salvo after merge 2021-11-22 14:39:44 -05:00
Vincent Biret d0b3cc1618
- bumps to net6 2021-11-19 11:12:39 -05:00
Vincent Biret 7b3fa55a20
- upgrades unit test project to net5 to keep support 2021-11-19 10:43:45 -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 3cce51566f
Skips generation of action/function paths for non-contained nav. props. (#115)
* Do not create actions/functions for non-containment nav. props

* Add test for Function Operations
2021-09-14 23:23:52 +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 e6a5e52e11
[Fix] Generate paths for stream properties in base types of entities (#110)
* Get all properties declared in type def. including base types

* Update/refactor tests to validate stream props. of base types are captured

* Refactor Handler class to use encapsulation to define navigation sources
2021-08-18 16:33:26 +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 72cd85d3ae
Set parameters' explode property to false (#108)
* Set Explode property to false for Style: Form

* Add tests for creating OrderBy, Select, Expand parameters

* Rename test method for clarity

Co-authored-by: Irvine Sunday <irochand@microsoft.com>
2021-07-09 09:55:32 -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 4c685b568b
Fix: Removes example property in path parameter objects (#92)
* Remove example property in Parameters

This helps in avoiding duplication with examples property. They are mutually exclusive. DocumentationURL prop. which used to be set in example property is now set within descriptions property.

* Update src/Microsoft.OpenApi.OData.Reader/Operation/OperationHandler.cs

Co-authored-by: Charles Wahome <thewahome.cw@gmail.com>

* Remove duplicate variable declaration

* Minor refactoring

To help trigger build

Co-authored-by: Irvine Sunday <irochand@microsoft.com>
Co-authored-by: Charles Wahome <thewahome.cw@gmail.com>
Co-authored-by: Sam Xu <saxu@microsoft.com>
2021-04-09 13:40:52 -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 aa5b0f0bc7 Add Metadata, segment and related path handler and operation handler, expand ODataPath to accept PathTemplate 2021-02-10 16:08:27 -08:00
Gareth Jones e1763727f5 Fix paths when operation is bound to a type derived from the type of a
navigation property. (#88)
2021-02-10 16:07:31 -08:00
Sam Xu 1643ba5ea1 Add Path provider and path prefix provider into setting 2021-02-08 19:57:15 -08:00
Sam Xu f98b9ce40d update the docs 2021-02-05 17:56:46 -08:00
Sam Xu dfbf083d53 Push changes from microsoft graph (#86) 2021-02-05 17:42:10 -08:00
Gareth Jones c1aa5a6f94
Add model reference support to library and command line utility. (#81)
* Support many conversion options in the command-line tool.
Support local reference files in file-based csdl in the library and command-line tool.

* Added tests for references.

* Updates from github review.
2021-01-14 16:56:26 -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
Gareth Jones 1270385b8d Added simple PathPrefix to ConvertSettings to match ODataRoute prefix without affecting 'servers' declaration in OAS file. 2020-05-12 23:34:24 -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
Irvine Sunday 3a00f2a540 Adds support for replacing base type references with their derived types #55 2020-04-02 19:47:28 -07:00
Sam Xu 90f5f8c4b5 Fix the failing test cases 2020-03-29 20:24:38 -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
Irvine Sunday 12518af366 Adding the pageable extension test 2020-03-16 12:57:04 +03:00
Sam Xu 3d62ec44e6 Change to .Net Framework version 4.7.2 because 4.6.1 is not recommended 2020-01-23 16:40:57 -08:00
Sam Xu 5c185cd67c Add the netcoreapp2.1 into the test project 2020-01-21 14:33:47 -08: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 35a35a5f56 Enable Uri escape function call 2019-09-26 12:57:15 -07:00
Sam Xu 5e3db101cf Fix issue #42: duplicate path parameters should be prevented 2019-09-25 14:44:02 -07:00
Sam Xu 1589b2622a Update to ODL.Edm 7.6.1.beta: Permission, Custom Heads, etc 2019-09-24 16:06:15 -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
Sam Xu 5a1efcc08e Add tests for record expression extensions 2019-06-28 11:28:17 -07:00