Skip to content

Commit

Permalink
refs #2126 - change safe-url-resolver package
Browse files Browse the repository at this point in the history
  • Loading branch information
frantuma committed Nov 18, 2024
1 parent 1bc2e79 commit 3b35ca0
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 23 deletions.
10 changes: 5 additions & 5 deletions modules/swagger-parser-safe-url-resolver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ This behavior can also be customized with the allowlist and denylist in the cons
Add the following to you `pom.xml` file under `dependencies`
```xml
<dependency>
<groupId>io.swagger.parser.v3</groupId>
<groupId>io.swagger</groupId>
<artifactId>swagger-parser-safe-url-resolver</artifactId>
// version of swagger-parser being used
<version>2.1.14</version>
<version>${swagger-parser-v1-version}</version>
</dependency>
```

## Example usage

```java
import io.swagger.v3.parser.urlresolver.PermittedUrlsChecker;
import io.swagger.v3.parser.urlresolver.exceptions.HostDeniedException;
import io.swagger.v3.parser.urlresolver.models.ResolvedUrl;
import io.swagger.parser.urlresolver.PermittedUrlsChecker;
import io.swagger.parser.urlresolver.exceptions.HostDeniedException;
import io.swagger.parser.urlresolver.models.ResolvedUrl;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package io.swagger.v3.parser.urlresolver;
package io.swagger.parser.urlresolver;

import io.swagger.v3.parser.urlresolver.exceptions.HostDeniedException;
import io.swagger.v3.parser.urlresolver.matchers.UrlPatternMatcher;
import io.swagger.v3.parser.urlresolver.models.ResolvedUrl;
import io.swagger.v3.parser.urlresolver.utils.NetUtils;
import io.swagger.parser.urlresolver.exceptions.HostDeniedException;
import io.swagger.parser.urlresolver.matchers.UrlPatternMatcher;
import io.swagger.parser.urlresolver.models.ResolvedUrl;
import io.swagger.parser.urlresolver.utils.NetUtils;

import java.net.InetAddress;
import java.net.MalformedURLException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.swagger.v3.parser.urlresolver.exceptions;
package io.swagger.parser.urlresolver.exceptions;

public class HostDeniedException extends Exception {
public HostDeniedException(String message) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.swagger.v3.parser.urlresolver.matchers;
package io.swagger.parser.urlresolver.matchers;

import io.swagger.v3.parser.urlresolver.utils.NetUtils;
import io.swagger.parser.urlresolver.utils.NetUtils;

import java.net.IDN;
import java.net.MalformedURLException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.swagger.v3.parser.urlresolver.models;
package io.swagger.parser.urlresolver.models;

public class ResolvedUrl {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.swagger.v3.parser.urlresolver.utils;
package io.swagger.parser.urlresolver.utils;

import java.net.Inet4Address;
import java.net.Inet6Address;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.swagger.v3.parser.urlresolver;
package io.swagger.parser.urlresolver;

import io.swagger.v3.parser.urlresolver.exceptions.HostDeniedException;
import io.swagger.v3.parser.urlresolver.models.ResolvedUrl;
import io.swagger.v3.parser.urlresolver.utils.NetUtils;
import io.swagger.parser.urlresolver.exceptions.HostDeniedException;
import io.swagger.parser.urlresolver.models.ResolvedUrl;
import io.swagger.parser.urlresolver.utils.NetUtils;
import mockit.*;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.swagger.v3.parser.urlresolver.matchers;
package io.swagger.parser.urlresolver.matchers;

import org.testng.Assert;
import org.testng.annotations.Test;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.swagger.v3.parser.urlresolver.utils;
package io.swagger.parser.urlresolver.utils;

import org.testng.Assert;
import org.testng.annotations.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
import io.swagger.models.refs.RefFormat;
import io.swagger.models.refs.RefType;
import io.swagger.parser.util.*;
import io.swagger.v3.parser.urlresolver.PermittedUrlsChecker;
import io.swagger.v3.parser.urlresolver.exceptions.HostDeniedException;
import io.swagger.parser.urlresolver.PermittedUrlsChecker;
import io.swagger.parser.urlresolver.exceptions.HostDeniedException;
import org.apache.commons.lang3.StringUtils;

import java.io.File;
Expand Down

0 comments on commit 3b35ca0

Please sign in to comment.