Skip to content

Commit 7dfc6d5

Browse files
authored
Made specification duplicates validation case insensitive so that "io.polyapi.FunctionName" would be a duplicate of "io.polyapi.Functionname". (#13)
1 parent f724319 commit 7dfc6d5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Java Client Library (beta)
2-
### v0.3.4
2+
### v0.3.5
33

44
## Introduction
55
Welcome my friends! This is the Poly API Java client GitHub page. If you are here, then it means you're familiar with what we do at Poly. If you aren't, you can always check [here](https://github.com/polyapi/poly-alpha).
@@ -347,6 +347,8 @@ Comparing to its Typescript counterpart, the Java library is still missing the f
347347
These features will be added in the future releases.
348348

349349
## Changelog
350+
### v0.3.5
351+
- Made specification duplicates validation case insensitive so that 'io.polyapi.FunctionName' would be a duplicate of 'io.polyapi.Functionname'.
350352
### v0.3.4
351353
- Added validation to avoid duplicate specifications based on context and name.
352354
### v0.3.3

polyapi-maven-plugin/src/main/java/io/polyapi/plugin/service/SpecificationServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public List<Specification> getJsonSpecs() {
3636
logger.debug("Validating for duplicate context/name pairs.");
3737
Map<String, Specification> uniquenessValidationMap = new HashMap<>();
3838
specifications.forEach(specification -> {
39-
String key = format("%s.%s", specification.getContext(), specification.getName());
39+
String key = format("%s.%s", specification.getContext(), specification.getName()).toLowerCase();
4040
if (uniquenessValidationMap.containsKey(key)) {
4141
logger.warn("Skipping {} specification '{}' in context '{}' as it clashes with {} specification with the same name and context.", specification.getType(), specification.getName(), specification.getContext(), uniquenessValidationMap.get(key).getType());
4242
} else {

0 commit comments

Comments
 (0)