Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pregress committed Oct 1, 2024
1 parent 17ae1c9 commit aded23d
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 1 deletion.
24 changes: 24 additions & 0 deletions Documentation/Changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Fixed
- N/A

## Release date 2024-10-01

Initial version, currently only removes links from open api definition files.


### Packages
apimsanitizer 1.0.0

### Fixed
- N/A

### Improvements
- Initial version
36 changes: 36 additions & 0 deletions Documentation/GlobalTool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# ApimSanitizer as a Global Tool

To see a list of options, run:

```bash
ApimSanitizer --help
```

The current options are (output of `ApimSanitizer --help`):

```text
Description:
Apim sanitizier, sanitize open api definitions to import them into Azure APIM
Usage:
ApimSanitizer [options]
Options:
-f, --file <file> (REQUIRED) The input open api definition file in yaml format.
--version Show version information
-?, -h, --help Show help and usage information
```



## Exit Codes

Coverlet outputs specific exit codes to better support build automation systems for determining the kind of failure so the appropriate action can be taken.

```bash
0 - Success.
1 - Invalid input file
2 - Input file doesn't exist
3 - Invalid extension, must be of type .yml
2147483647 - General exception occurred during process.
```
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,27 @@
# ApimSanitizer
Tool that helps to sanitize open api defintion files to import them into Azure APIM
Tool that helps to sanitize open api defintion files to import them into Azure APIM.
This is to bypass the [limits](https://learn.microsoft.com/en-us/azure/api-management/api-management-api-import-restrictions#unsupported) of api management.

Currenlty only removes [links](https://swagger.io/docs/specification/v3_0/links/) from the definition.


# Install
```
dotnet tool install -g apimsanitizer
```

# Usage
```
apimsanitizer -f ./your/path/to/api-definition.yml
```


## Local testing

```
cd src
dotnet pack --configuration Release
dotnet tool install -g --add-source .\bin\Release apimsanitizer
apimsanitizer -f {path-to-openapi.yml}
```
Binary file added _assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit aded23d

Please sign in to comment.