-
Notifications
You must be signed in to change notification settings - Fork 743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add min length and max length support to schema generator #1503
Conversation
@@ -99,6 +99,16 @@ public string ResourceType | |||
public string Pattern { get; set; } | |||
|
|||
/// <summary> | |||
/// The minimum length that a string or an array matching this schema can have. | |||
/// </summary> | |||
public double? MinLength { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious... why a double?
and not int?
-- I am unaware of the need for floating-point precision in lengths...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to keep the C# as close to the JSON as possible. Since the JSON value is a number, I thought it made sense to use C#'s equivalent data type.
* Adding validation rules for subscriptionId/api-version params * Introduced Plugin Model (refactored plugin classes) * [Python] CloudError updates (#1510) * Updated CloudError * Added exception documentation * Regenerated tests * All tests working * [Go] Paging tests and general paging fixes (#1489) * Trying to delete duplication * Graph doesn't duplicate odatanextlink * OdataNextLink not duplicated and correctly named * Not needed preparers for paged results are no longer included in models file. This also causes that if there is already a next method defined in swagger for that model (including generic next methods), autorest wont generate the specific next links. * Added paging tests (except fragment link) * Added fragment next link test * Fixed code about preparer for pages types * msrestazure 0.4.4 (#1514) * Addressed PR comments * Remove Python msrest/msrestazure from Autorest repo (#1518) * Remove msrest from Autorest repo * Remove Python msrest from gulpfile * Remove hack in msrestazure to read ../msrest * Update dependencies of Python msrestazure to get msrest from PyPI * Adding mock in msrestazure tests * Simplify tox config for msrestazure * msrestazure 0.4.4 (#1514) * Remove msrestazure Python * Minor code cleanup * Fixing json descriptions * Add min length and max length support to schema generator (#1503) * Add ServiceBus AzureResourceSchema acceptance test * Add minLength and maxLength support to schema generator * Fixing logic to add missing schema resources * Add sql schema test (#1486) * Add ServiceBus AzureResourceSchema acceptance test * Add SQL schema test and fix NotificationHubs schema test * Add service fabric schema tests (#1485) * Add ServiceBus AzureResourceSchema acceptance test * Add ServiceFabric schema test, fix NotificationHubs schema test * Updates/cleanups to plugin model,core and node/c# * small updates to modeler classes * updated project.json files * fixing tests * fixed loader test * Bumping version to fix nuget problem
* Add ServiceBus AzureResourceSchema acceptance test * Add minLength and maxLength support to schema generator * Fixing logic to add missing schema resources
* Refactor code model (#1444) * CodeModel Refactoring - Moved/Renamed Files * CodeModel Refactoring - Changes to AutoRest/AutoRest.Core * CodeModel Refactoring - Core Tests changes * CodeModel Refactoring - AutoRest.Extensions changes * CodeModel Refactoring - AutoRest.Extensions Tests changes * CodeModel Refactoring - Fix compiler warnign * CodeModel Refactoring - CSharp Generator * CodeModel Refactoring - CSharp Azure Generator * CodeModel Refactoring - CSharp Tests Changes * CodeModel Refactoring - NodeJS changes * CodeModel Refactoring - NodeJS Azure changes * CodeModel Refactoring - Modeler changes * Fix/enable all tests * Fix up c# unit tests * small fixes in Moder * Some last-minute tweaks to the generators to pass tests * Changes to finish getting all the tests to run (in core) * Extensions tests cleanup * Resharper settings * Tweaking the build to build and test ok via gulp * accidentally overwrote fix for in memory assemblies * Fixed glitch in builing * Tweaking build for linux * cleaning up small issues and removing superflous junk * cleaned up stuff around nullability (and some other minor cleanups) * cleaned up stuff around nullability (and some other minor cleanups) - c# * Regenerated Tests Expected files * small code cleanups * Adding compare script to validate against rest-api-specs repo * added report generation to compare script (requires Araxis Merge installed and configured) * fixed use of clientproperty == null (should use !IsClientProperty) * Introduced Plugin Model (refactored plugin classes) (#1509) * Adding validation rules for subscriptionId/api-version params * Introduced Plugin Model (refactored plugin classes) * [Python] CloudError updates (#1510) * Updated CloudError * Added exception documentation * Regenerated tests * All tests working * [Go] Paging tests and general paging fixes (#1489) * Trying to delete duplication * Graph doesn't duplicate odatanextlink * OdataNextLink not duplicated and correctly named * Not needed preparers for paged results are no longer included in models file. This also causes that if there is already a next method defined in swagger for that model (including generic next methods), autorest wont generate the specific next links. * Added paging tests (except fragment link) * Added fragment next link test * Fixed code about preparer for pages types * msrestazure 0.4.4 (#1514) * Addressed PR comments * Remove Python msrest/msrestazure from Autorest repo (#1518) * Remove msrest from Autorest repo * Remove Python msrest from gulpfile * Remove hack in msrestazure to read ../msrest * Update dependencies of Python msrestazure to get msrest from PyPI * Adding mock in msrestazure tests * Simplify tox config for msrestazure * msrestazure 0.4.4 (#1514) * Remove msrestazure Python * Minor code cleanup * Fixing json descriptions * Add min length and max length support to schema generator (#1503) * Add ServiceBus AzureResourceSchema acceptance test * Add minLength and maxLength support to schema generator * Fixing logic to add missing schema resources * Add sql schema test (#1486) * Add ServiceBus AzureResourceSchema acceptance test * Add SQL schema test and fix NotificationHubs schema test * Add service fabric schema tests (#1485) * Add ServiceBus AzureResourceSchema acceptance test * Add ServiceFabric schema test, fix NotificationHubs schema test * Updates/cleanups to plugin model,core and node/c# * small updates to modeler classes * updated project.json files * fixing tests * fixed loader test * Bumping version to fix nuget problem * Updated AzureResourceGenerator to work in new code model * Ruby Refactored To New Code Model (#1535) * Ruby Refactored To New Code Model * fixed small glitches in generator * reverted incorrect fix * checkpoint - work in progress * checkpoint - work in progress #2 * checkpoint - work in progress #3 * stop generating tmp files * Upcased Module name for enums * Added ModuleName to EnumTypeRb * Used Rb type EnumType in Plugin * sigh * Deleted missing paren * Update CodeGeneratorRba.cs * Update CodeGeneratorRb.cs * merge from master and regenerate a couple files * Update gulpfile.js * Fixing property names with leading underscores (#1546) Fixing property names with leading underscores * Changes to the Python Code Generator for the Refactored Code Model (#1539) * Checkpoint - Merged RefactorCodeModel and NewPython branches * Checkpoint - Merged RefactorCodeModel and NewPython branches * Missed file * Checkpoint - Python, tracking down last glitches (still have to fix the composite swagger merge problem) * Checkpoint - Python cleaned up some more glitches * Make sure that compositemodeler is using types from the model. * Python Changes, reviewed by @anna and @lmazuel * regenerated tests * fixup node test failure after refactor * fixed overzealous use of capital 'd' Decimal * updated version to 1.0 ( still in preview) * Temporarily removing Go, Java, Fluent projects from solution until stable in new model
No description provided.