@@ -29,10 +29,10 @@ object SwaggerScalaModelConverter {
2929 private var requiredBasedOnAnnotation = true
3030
3131 /** If you use swagger annotations to override what is automatically derived, then be aware that
32- * [[io.swagger.v3.oas.annotations.media.Schema ]] annotation has required = [[ false ]] , by default. You are advised to set the required
32+ * [[io.swagger.v3.oas.annotations.media.Schema ]] annotation has required = false, by default. You are advised to set the required
3333 * flag on this annotation to the correct value. If you would prefer to have the Schema annotation required flag ignored and to rely on
3434 * the this module inferring the value (as ot would if you don't annotate the classes or fields), then set
35- * [[SwaggerScalaModelConverter.setRequiredBasedOnAnnotation ]] to [[ true ]] and the required property on the annotation will be ignored,
35+ * [[SwaggerScalaModelConverter.setRequiredBasedOnAnnotation ]] to true and the required property on the annotation will be ignored,
3636 * unless the field is an [[Option ]].
3737 *
3838 * @param value
@@ -43,10 +43,10 @@ object SwaggerScalaModelConverter {
4343 }
4444
4545 /** If you use swagger annotations to override what is automatically derived, then be aware that
46- * [[io.swagger.v3.oas.annotations.media.Schema ]] annotation has required = [[ false ]] , by default. You are advised to set the required
46+ * [[io.swagger.v3.oas.annotations.media.Schema ]] annotation has required = false, by default. You are advised to set the required
4747 * flag on this annotation to the correct value. If you would prefer to have the Schema annotation required flag ignored and to rely on
4848 * the this module inferring the value (as ot would if you don't annotate the classes or fields), then set
49- * [[SwaggerScalaModelConverter.setRequiredBasedOnAnnotation ]] to [[ true ]] and the required property on the annotation will be ignored,
49+ * [[SwaggerScalaModelConverter.setRequiredBasedOnAnnotation ]] to true and the required property on the annotation will be ignored,
5050 * unless the field is an [[Option ]].
5151 *
5252 * @return
@@ -215,7 +215,7 @@ class SwaggerScalaModelConverter extends ModelResolver(SwaggerScalaModelConverte
215215 private def filterUnwantedProperties (schema : Schema [_], propertiesToKeep : Seq [PropertyDescriptor ]): Unit = {
216216 val propNamesSet = propertiesToKeep.map(getAnnotatedPropertyName).toSet
217217 val originalProps = nullSafeMap(schema.getProperties)
218- val newProps = originalProps.filter { case (key, value ) =>
218+ val newProps = originalProps.filter { case (key, _ ) =>
219219 propNamesSet.contains(key)
220220 }
221221 if (originalProps.size > newProps.size) {
@@ -401,7 +401,6 @@ class SwaggerScalaModelConverter extends ModelResolver(SwaggerScalaModelConverte
401401 property.param match {
402402 case Some (constructorParameter) =>
403403 val types = constructorParameter.constructor.getParameterTypes
404- val annotations = constructorParameter.constructor.getParameterAnnotations
405404 val index = constructorParameter.index
406405 if (index > types.size) {
407406 AnyClass
0 commit comments