@Test public void shouldSanitizeListOfTags() { assertThat(OasModelHelper.sanitizeTags(Arrays.asList("tag", "wag ", " bag", ".]t%a$g#[/"))) .containsExactly("tag", "wag", "bag"); }
public static Stream<String> sanitizeTags(final List<String> list) { if (list == null || list.isEmpty()) { return Stream.empty(); } return list.stream().map(OasModelHelper::sanitizeTag).filter(Objects::nonNull).distinct(); }
OasModelHelper { public static Stream<String> sanitizeTags(final List<String> list) { if (list == null || list.isEmpty()) { return Stream.empty(); } return list.stream().map(OasModelHelper::sanitizeTag).filter(Objects::nonNull).distinct(); } }
OasModelHelper { public static Stream<String> sanitizeTags(final List<String> list) { if (list == null || list.isEmpty()) { return Stream.empty(); } return list.stream().map(OasModelHelper::sanitizeTag).filter(Objects::nonNull).distinct(); } private  OasModelHelper(); }
OasModelHelper { public static Stream<String> sanitizeTags(final List<String> list) { if (list == null || list.isEmpty()) { return Stream.empty(); } return list.stream().map(OasModelHelper::sanitizeTag).filter(Objects::nonNull).distinct(); } private  OasModelHelper(); static OperationDescription operationDescriptionOf(final OasDocument openApiDoc, final OasOperation operation,
                                                              final BiFunction<String, String, String> consumer); static List<OasPathItem> getPathItems(OasPaths paths); static List<OasParameter> getParameters(final OasOperation operation); static List<OasParameter> getParameters(final OasPathItem pathItem); static String sanitizeTag(final String tag); static Stream<String> sanitizeTags(final List<String> list); static Map<String, OasOperation> getOperationMap(OasPathItem pathItem); static Map<String, T> getOperationMap(OasPathItem pathItem, Class<T> type); static String getReferenceName(String reference); static boolean isArrayType(OasSchema schema); static boolean isReferenceType(OasSchema schema); static boolean isReferenceType(OasParameter parameter); static boolean isBody(OasParameter parameter); static String getPropertyName(OasSchema schema); static String getPropertyName(OasSchema schema, String defaultName); static boolean isSerializable(OasParameter parameter); static boolean schemaIsNotSpecified(final OasSchema schema); static URI specificationUriFrom(final OasDocument openApiDoc); }
OasModelHelper { public static Stream<String> sanitizeTags(final List<String> list) { if (list == null || list.isEmpty()) { return Stream.empty(); } return list.stream().map(OasModelHelper::sanitizeTag).filter(Objects::nonNull).distinct(); } private  OasModelHelper(); static OperationDescription operationDescriptionOf(final OasDocument openApiDoc, final OasOperation operation,
                                                              final BiFunction<String, String, String> consumer); static List<OasPathItem> getPathItems(OasPaths paths); static List<OasParameter> getParameters(final OasOperation operation); static List<OasParameter> getParameters(final OasPathItem pathItem); static String sanitizeTag(final String tag); static Stream<String> sanitizeTags(final List<String> list); static Map<String, OasOperation> getOperationMap(OasPathItem pathItem); static Map<String, T> getOperationMap(OasPathItem pathItem, Class<T> type); static String getReferenceName(String reference); static boolean isArrayType(OasSchema schema); static boolean isReferenceType(OasSchema schema); static boolean isReferenceType(OasParameter parameter); static boolean isBody(OasParameter parameter); static String getPropertyName(OasSchema schema); static String getPropertyName(OasSchema schema, String defaultName); static boolean isSerializable(OasParameter parameter); static boolean schemaIsNotSpecified(final OasSchema schema); static URI specificationUriFrom(final OasDocument openApiDoc); static final String URL_EXTENSION; }