public io.swagger.v3.oas.annotations.Parameter generateParameterBySchema(io.swagger.v3.oas.annotations.media.Schema schema) {
		return new io.swagger.v3.oas.annotations.Parameter() {
			@Override
			public Class<? extends Annotation> annotationType() {
				return io.swagger.v3.oas.annotations.Parameter.class;
			}

			@Override
			public String name() {
				return schema.name();
			}

			@Override
			public ParameterIn in() {
				return ParameterIn.DEFAULT;
			}

			@Override
			public String description() {
				return schema.description();
			}

			@Override
			public boolean required() {
				return schema.requiredMode().equals(RequiredMode.AUTO) ?
						schema.required() :
						schema.requiredMode().equals(RequiredMode.REQUIRED);
			}

			@Override
			public boolean deprecated() {
				return schema.deprecated();
			}

			@Override
			public boolean allowEmptyValue() {
				return false;
			}

			@Override
			public ParameterStyle style() {
				return ParameterStyle.DEFAULT;
			}

			@Override
			public Explode explode() {
				return Explode.DEFAULT;
			}

			@Override
			public boolean allowReserved() {
				return false;
			}

			@Override
			public io.swagger.v3.oas.annotations.media.Schema schema() {
				return schema;
			}

			@Override
			public io.swagger.v3.oas.annotations.media.ArraySchema array() {
				return null;
			}

			@Override
			public io.swagger.v3.oas.annotations.media.Content[] content() {
				return new io.swagger.v3.oas.annotations.media.Content[0];
			}

			@Override
			public boolean hidden() {
				return schema.hidden();
			}

			@Override
			public ExampleObject[] examples() {
				return new ExampleObject[0];
			}

			@Override
			public String example() {
				return schema.example();
			}

			@Override
			public Extension[] extensions() {
				return schema.extensions();
			}

			@Override
			public String ref() {
				return schema.ref();
			}

			@Override
			public Class<?>[] validationGroups() {
				return new Class[0];
			}
		};
	}
Generate parameter by schema

@param schema the schema
@return the io.swagger.v3.oas.annotations.Parameter
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service/GenericParameterService.java