Commit graph

223 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 a8bb14f26e
- applies code review suggestions
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
2021-11-23 13:40:54 -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 032fbaefb4
- fixes a bug where the operation id for count operations would not be unique
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
2021-11-22 15:38:40 -05:00
Vincent Biret 76cfc303bc
- switches to a referenced schema for count operations
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
2021-11-22 14:42:38 -05:00
Vincent Biret 2fee91b384
- code linting
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
2021-11-22 14:42:38 -05:00
Vincent Biret ae11d65007
- fixes #129 a bug where odata count paths would be missing from the description
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
2021-11-22 14:42:38 -05:00
Vincent Biret f08be6482f
- code linting
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
2021-11-22 14:42:37 -05:00
Vincent Biret 960b31b350
- code linting
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
2021-11-22 14:42:37 -05:00
Vincent Biret 883ca922db
- pattern matching refactoring
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
2021-11-22 14:42:36 -05:00
Vincent Biret 094bf81732
- upgrades dependencies to avoid dependabot salvo after merge 2021-11-22 14:39:44 -05:00
Vincent Biret 0073118250 Merge branch 'master' into feature/net5 2021-11-22 16:40:22 +00:00
Vincent Biret 948fbc6d4c
- removes obsolete file after conversion 2021-11-22 10:55:41 -05:00
Sam Xu 37b222f426 Add SourceLink, Remove non-yaml build badge, Update Nuget dependency
version
2021-11-19 09:41:54 -08:00
Vincent Biret 9073743d90
- bumps everything to net6 for supportability
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
2021-11-19 11:19:41 -05:00
Vincent Biret 336a7dba80
- fixes csproj encoding 2021-11-19 11:13:58 -05:00
Vincent Biret 1d0f0d7e71
- update util to net5 2021-11-19 11:13:58 -05:00
Vincent Biret ecf4f39109
- converts gui app to net5
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
2021-11-19 11:13:57 -05:00
dependabot[bot] fdf8d233c6
Bump Microsoft.OData.Edm from 7.6.1 to 7.9.4
Bumps Microsoft.OData.Edm from 7.6.1 to 7.9.4.

---
updated-dependencies:
- dependency-name: Microsoft.OData.Edm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-18 21:21:54 +00:00
dependabot[bot] af532f71b9
Bump Microsoft.OpenApi from 1.2.2 to 1.2.3 (#134)
Bumps [Microsoft.OpenApi](https://github.com/Microsoft/OpenAPI.NET) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/Microsoft/OpenAPI.NET/releases)
- [Commits](https://github.com/Microsoft/OpenAPI.NET/compare/1.2.2...1.2.3)

---
updated-dependencies:
- dependency-name: Microsoft.OpenApi
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-18 10:43:16 -08: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 9d6bdd5ae0 Add async await to make UI more responsive 2021-05-04 17:35:42 -07:00
Jukka Snellman 830eb357c7 add support for EdmTypeKind.TypeDefinition 2021-04-19 09:22:40 -07:00
Sam Xu 5531eb3c3c 1. Update the version to 1.0.7
2. Add PublicApi analyzier
3. Add config for ShowMsDocGroupPath
2021-04-13 10:04:06 -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 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 e0135613d6 output the xml file, add into nuget package, fix the build warning 2020-06-04 11:13:38 -07: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
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