You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6
+
7
+
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.
8
+
9
+
## Reporting Security Issues
10
+
11
+
**Please do not report security vulnerabilities through public GitHub issues.**
12
+
13
+
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
14
+
15
+
If you prefer to submit without logging in, send email to [[email protected]](mailto:[email protected]). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/msrc/pgp-key-msrc).
16
+
17
+
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
18
+
19
+
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20
+
21
+
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22
+
* Full paths of source file(s) related to the manifestation of the issue
23
+
* The location of the affected source code (tag/branch/commit or direct URL)
24
+
* Any special configuration required to reproduce the issue
25
+
* Step-by-step instructions to reproduce the issue
26
+
* Proof-of-concept or exploit code (if possible)
27
+
* Impact of the issue, including how an attacker might exploit the issue
28
+
29
+
This information will help us triage your report more quickly.
30
+
31
+
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
32
+
33
+
## Preferred Languages
34
+
35
+
We prefer all communications to be in English.
36
+
37
+
## Policy
38
+
39
+
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/msrc/cvd).
varcsdlOption=newOption<string>("--csdl","Input CSDL file path or URL");
25
-
csdlOption.AddAlias("-cs");
25
+
csdlOption.AddAlias("--cs");
26
26
27
27
varcsdlFilterOption=newOption<string>("--csdl-filter","Comma delimited list of EntitySets or Singletons to filter CSDL on. e.g. tasks,accounts");
28
-
csdlFilterOption.AddAlias("-csf");
28
+
csdlFilterOption.AddAlias("--csf");
29
29
30
30
varoutputOption=newOption<FileInfo>("--output",()=>newFileInfo("./output"),"The output directory path for the generated file."){Arity=ArgumentArity.ZeroOrOne};
31
31
outputOption.AddAlias("-o");
32
32
33
33
varcleanOutputOption=newOption<bool>("--clean-output","Overwrite an existing file");
varlogLevelOption=newOption<LogLevel>("--loglevel",()=>LogLevel.Information,"The log level to use when logging messages to the main output.");
46
-
logLevelOption.AddAlias("-ll");
45
+
varlogLevelOption=newOption<LogLevel>("--log-level",()=>LogLevel.Information,"The log level to use when logging messages to the main output.");
46
+
logLevelOption.AddAlias("--ll");
47
47
48
48
varfilterByOperationIdsOption=newOption<string>("--filter-by-operationids","Filters OpenApiDocument by comma delimited list of OperationId(s) provided");
49
-
filterByOperationIdsOption.AddAlias("-op");
49
+
filterByOperationIdsOption.AddAlias("--op");
50
50
51
51
varfilterByTagsOption=newOption<string>("--filter-by-tags","Filters OpenApiDocument by comma delimited list of Tag(s) provided. Also accepts a single regex.");
52
-
filterByTagsOption.AddAlias("-t");
52
+
filterByTagsOption.AddAlias("--t");
53
53
54
54
varfilterByCollectionOption=newOption<string>("--filter-by-collection","Filters OpenApiDocument by Postman collection provided. Provide path to collection file.");
55
55
filterByCollectionOption.AddAlias("-c");
56
56
57
-
varinlineLocalOption=newOption<bool>("--inlineLocal","Inline local $ref instances");
58
-
inlineLocalOption.AddAlias("-il");
57
+
varinlineLocalOption=newOption<bool>("--inline-local","Inline local $ref instances");
Hidi is a command line tool that makes it easy to work with and transform OpenAPI documents. The tool enables you validate and apply transformations to and from different file formats using various commands to do different actions on the files.
4
+
5
+
## Capabilities
6
+
Hidi has these key capabilities that enable you to build different scenarios off the tool
7
+
8
+
• Validation of OpenAPI files
9
+
• Conversion of OpenAPI files into different file formats: convert files from JSON to YAML, YAML to JSON
10
+
• Slice or filter OpenAPI documents to smaller subsets using operationIDs and tags
11
+
12
+
13
+
## Installation
14
+
15
+
Install [Microsoft.OpenApi.Hidi](https://www.nuget.org/packages/Microsoft.OpenApi.Hidi/1.0.0-preview4) package from NuGet by running the following command:
Once you've installed the package locally, you can invoke the Hidi by running: hidi [command].
31
+
You can access the list of command options we have by running hidi -h
32
+
The tool avails the following commands:
33
+
34
+
• Validate
35
+
• Transform
36
+
37
+
### Validate
38
+
This command option accepts an OpenAPI document as an input parameter, visits multiple OpenAPI elements within the document and returns statistics count report on the following elements:
39
+
40
+
• Path Items
41
+
• Operations
42
+
• Parameters
43
+
• Request bodies
44
+
• Responses
45
+
• Links
46
+
• Callbacks
47
+
• Schemas
48
+
49
+
It accepts the following command:
50
+
51
+
• --openapi(-d) - OpenAPI description file path or URL
52
+
• --loglevel(-ll) - The log level to use when logging messages to the main output
Used to convert file formats from JSON to YAML and vice versa and performs slicing of OpenAPI documents.
61
+
62
+
This command accepts the following parameters:
63
+
64
+
• --openapi(-d) - OpenAPI description file path in the local filesystem or a valid URL hosted on a HTTPS server
65
+
• --csdl(-cs) - CSDL file path in the local filesystem or a valid URL hosted on a HTTPS server
66
+
• --csdlfilter(-csf) - a filter parameter that a user can use to select a subset of a large CSDL file. They do so by providing a comma delimited list of EntitySet and Singleton names that appear in the EntityContainer.
67
+
• --output(-o) - Output directory path for the transformed document
68
+
• --clean-ouput(-co) - an optional param that allows a user to overwrite an existing file.
69
+
• --version(-v) - OpenAPI specification version
70
+
• --format(-f) - File format
71
+
• --loglevel(-ll) - The log level to use when logging messages to the main output
72
+
• --inline(-i) - Inline $ref instances
73
+
• --resolveExternal(-ex) - Resolve external $refs
74
+
• --filterByOperationIds(-op) - Slice document based on OperationId(s) provided. Accepts a comma delimited list of operation ids.
75
+
• --filterByTags(-t) - Slice document based on tag(s) provided. Accepts a comma delimited list of tags.
76
+
• --filterByCollection(-c) - Slices the OpenAPI document based on the Postman Collection file generated by Resource Explorer
0 commit comments