Граф коммитов

186 Коммитов

Автор SHA1 Сообщение Дата
Vincent Biret 0c36b1add9
Merge pull request #248 from microsoft/users/GitHubPolicyService/e6d2d949-bc02-4ea4-8375-6fe0d4d956f4
Adding Microsoft SECURITY.MD
2022-08-29 10:15:27 -04:00
microsoft-github-policy-service[bot] 86b2e2e147
Microsoft mandatory file 2022-08-17 14:53:31 +00:00
Shweta Patil 5adf95d7b3
Advance config can contain types that might not be referenced in operation elements in annotation xml so this code change is to fetch type information for advance config elements too. (#211) 2019-05-24 14:03:09 -07:00
Shweta Patil f6cfb6528c
Fix assembly conflict issue (#208)
- Added logic to handle assembly load conflicts that would work for both .Net Framework and .Net Core run times.
- All of the type load logic is moved up so all the required type information is fetched before we actually proceed with generation.
- Updated contracts for filters to include list of generation errors, that would be populated by each filter as it processes various xElements.
- Added newtonsoft to handle serialization.
- Other cascading changes.
- Updated major version of the package.

P.S. This commit brings lots of breaking changes.
2019-05-18 15:24:07 -07:00
Alp Oral 541f501b2a Fallback to runtime serialization property name if NewtonSoft does no… (#206)
* Fallback to runtime serialization property name if NewtonSoft does not exist

* test cases and binary update
2019-04-18 14:40:51 -07:00
Shweta Patil 7a2546c307
Fix for #148 (#198)
* Fix for #148
2019-02-05 17:21:19 -08:00
Shweta Patil c2adb08662
updated release timeframe (#193) 2018-12-11 11:56:34 -08:00
Scott Lin 0d0e60bba3
Updating OpenAPI.NET version to 1.1.1 (#166)
* Updating OpenAPI.NET version.

* Update nuget version.
2018-11-29 13:38:58 -08:00
Shweta Patil 00d5a4041e
Fix for #163 (#164) 2018-10-30 12:43:38 -07:00
Eric Langland a3f2ff23a3
Merge pull request #161 from Microsoft/security-sample-code
Fixing a few annotations for the new security schemes.
2018-10-17 17:24:39 -07:00
Eric Langland 4437f7216b Fixing a few annotations for the new security schemes. 2018-10-17 17:11:23 -07:00
Shweta Patil 70e0ba14b1
- Added support to pass open api info description (#158)
- Added support to pass open api info description
- Updated OpenApi.Net related packages.
2018-10-01 09:48:50 -07:00
Shweta Patil fb12e38735
- Added support for security tag (#157)
- Added support for security tag
- Fixed #155
2018-09-27 12:57:11 -07:00
Shweta Patil a200922bd5
Fix base class property description (#154)
* Filter update to fetch base types for a type and fetch base types properties description too.
2018-09-19 15:10:41 -07:00
Shweta Patil f0cb34d53c
- Added serializable attribute so can be passed across app domains (#153) 2018-09-14 15:43:27 -07:00
Shweta Patil 984ad9eff3
Performance improvements (#145)
* Performance improvement by
- Storing type map
- Do not unnecessarily loop through all loaded assemblies
2018-09-10 14:18:45 -07:00
PerthCharern 19ad4210c4
Merge pull request #146 from Microsoft/perthcha/FixSampleApisRouting
Allow Sample API endpoints to be hit.

- Fix multiple small bugs in sample APIs:

- Modify web.config to allow PUT and DELETE to be hit. MVC by default only allows GET and POST.

- Remove the front slash '/' and the query param from the attribute-based routing since they are prohibited.

- Register the MVC attribute-based routing in RouteConfig.cs

- Rename the controllers. MVC requires the controllers to end with suffix Controller. If we don't do this, we cannot hit the endpoints :(

- Fix wrong parameters in SampleV4Controller.
2018-08-27 16:41:50 -07:00
Perth Charernwattanagul c6b4946ef8 Changed NotSupportedException to NotImplementedException for clarity. 2018-08-27 16:21:34 -07:00
Perth Charernwattanagul 5d802a81ec Make queryString optional.
Note queryBool is still required.
2018-08-27 16:18:08 -07:00
Perth Charernwattanagul 0cdfaa4611 Add async modifier since the methods return tasks. 2018-08-27 16:13:07 -07:00
Perth Charernwattanagul fd96a1e679 Fix bugs in the routing in sample APIs to allow the endpoitns to be hit.
1) Modify web.config to allow PUT and DELETE to be hit. MVC by default only allows GET and POST.

2) Remove the front slash '/' and the query param from the attribute-based routing since they are prohibited.

3) Register the MVC attribute-based routing in RouteConfig.cs

4) Rename the controllers. MVC requires the controllers to end with suffix `Controller`. If we don't do this, we cannot hit the endpoints :(

5) Fix wrong parameters in SampleV4Controller.
2018-08-27 16:08:11 -07:00
Eric Langland aa458b89e4
Merge pull request #144 from Microsoft/EricAtMSFT-patch-1
Adding link back to VSTS build task
2018-08-14 15:51:27 -07:00
Eric Langland a254e5b616
Adding link back to VSTS build task
Folks might find the VSTS build task useful that wraps this library.
2018-08-13 20:55:07 -07:00
Shweta Patil 91abadd022
Code changes to fix the description bug (#140)
Code changes to fix the description bug which is parsed wrong if description is last element of 
 the parameter node
2018-07-12 15:31:28 -07:00
Shweta Patil 383a0d9966
Null reference fix when empty JsonObject attribute is specified. (#139) 2018-07-03 14:23:05 -07:00
Shweta Patil 06cbd617cb
Support examples (#137)
- Added support for examples and response headers
2018-07-03 10:26:54 -07:00
Shweta Patil 91e833d68f
- SchemaRegistry Code change to look for JObject attribute and populate the naming strategy (#138)
- Remove settings readonly when property have only get
2018-07-02 11:10:38 -07:00
Shweta Patil 91392c7512
Schema generation settings (#133)
- Added open api document generation settings, to enable configuring property name in OpenAPIDocument and added it as optional input to Generator.
- Added interface for resolving property name and added default and camel case implementation of it
- Unit test for changes.
2018-06-14 14:11:12 -07:00
Shweta Patil 93998583fb
Duplicate path bug fix (#130)
- Bug fix for issue where if full api document had duplicate paths, it was not added to variant document even if that document doesn't contain duplicate
- Bug fix to not remove paths with duplicate path error as the duplicate paths were never added to the document.
2018-06-01 11:10:26 -07:00
Shweta Patil 506e7f479e
Handle duplicate properties while generating schema (#129)
Code changes
- To handle case where both base class and child class have property with same name.
- Throw error when legitimate duplicate properties are found.
2018-05-30 13:48:25 -07:00
Eric Langland e8d17955e4
Merge pull request #127 from Microsoft/samples-typo
Fixing small typo in the sample API.
2018-05-25 16:00:10 -07:00
ravennasoftware 6b89f8c63b Fixing small typo in the sample API. 2018-05-25 13:03:51 -07:00
Shweta Patil ba6bd87c31
undocumented path parameters need to be moved in "ValidateInAttributeFilter" so it gets executed after alternate tags with no matching param tags are converted to param tags. (#126)
undocumented path parameters need to be moved in "ValidateInAttributeFilter"
Description: Undocumented path parameters need to be moved in "ValidateInAttributeFilter" so it gets executed after alternate tags with no matching param tags are converted to param tags.

Otherwise for documentation like below, undocumented path error is thrown:

<member name="M:Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.SampleApis.Controllers.SampleControllerV1.SamplePut(System.String,Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts.SampleObject1)">
      <summary>
        Sample put
      </summary>
      <group>Sample V1</group>
      <verb>PUT</verb>
      <!-- Use alternative param tags with no corresponding param tags. -->
      <url>http://localhost:9000/V1/samples/{id}</url>
      <header name="sampleHeaderParam1" cref="T:System.Single">Header param 1</header>
      <header name="sampleHeaderParam2" cref="T:System.String">Header param 2</header>
      <header name="sampleHeaderParam3" cref="T:System.String">Header param 3</header>
      <pathParam name="id" cref="T:System.String">The object id</pathParam>
      <requestType>
        <see cref="T:Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Tests.Contracts.SampleObject1"/>Sample object
      </requestType>
      <!-- ////////////////////////// -->
      <returns>The sample object 1</returns
2018-05-24 13:04:43 -07:00
Shweta Patil 8235ef695a
When Alternate tags are provided remove Param tag for which in attribute is not specified (#125)
* When legacy tags are provided remove param tags for which in attributes are not specified.
* Changes to split populate in filter into two to allow mix use of alternate and recommended tags.
2018-05-24 10:38:52 -07:00
Shweta Patil bb2d78eb53
Readme update with link to nuget package (#124) 2018-05-14 17:08:03 -07:00
Shweta Patil e7da529a62
Trim spaces in alternate param tags name (#122)
- Trim spaces when parsing alternate param tags
2018-05-14 11:08:41 -07:00
Shweta Patil 3cb890b039
Handle CData nodes in remarks/summary (#120)
- Handle CData nodes in remarks/summary
- Trim blank lines from parameter description
- Rev to latest OpenAPI packages
2018-05-11 15:14:59 -07:00
Eric Langland 3766d43a40
Merge pull request #121 from Microsoft/url-change
Removing localhost from the sample API to promote best practices in annotations.
2018-05-11 09:34:09 -07:00
Eric Langland 517b6954a8 Removing localhost from the sample API to promote best practices in annotation. 2018-05-10 17:39:09 -07:00
Eric Langland 89a949ddf9
Merge pull request #118 from Microsoft/banner-update
Updating the banner image.
2018-05-09 09:55:35 -07:00
ravennasoftware eb6a59470a Updating the banner image. 2018-05-09 09:43:15 -07:00
Shweta Patil 22411572df
Error messaging fix when provided "in" attribute value is not supported. (#117)
- Error messaging fix when provided "in" attribute value is not supported.
2018-05-04 14:59:28 -07:00
PerthCharern 84c1ca2bbb
Merge pull request #116 from Microsoft/PerthCharern/UpdateReadme
Update README. Move the explanation section down.
2018-05-02 15:15:40 -07:00
PerthCharern 259c664c42
A few grammatical changes 2018-05-02 14:56:00 -07:00
PerthCharern 3b67c45694
Add newline to space out the picture and the text 2018-05-02 14:55:01 -07:00
PerthCharern 3b50b1b244
More formatting changes 2018-05-02 14:53:29 -07:00
PerthCharern 7ac026e8c4
Fix formatting 2018-05-02 14:45:08 -07:00
PerthCharern a453c5ffdc
Formatting and spelling changes 2018-05-02 14:34:48 -07:00
PerthCharern de5f79c842
Rephrase a few things in the Mechanics section
Rephrase a few things in the Mechanics section
2018-05-02 14:25:36 -07:00
PerthCharern 803e3711bf
Update README. Move the explanation section down.
Update README. 

- Move the explanation section down.
- Fix some formatting and spelling issues
2018-05-02 14:20:25 -07:00