Question: I want to write a `regex` for extracting numbers from the following text (that is part of a bigger text):

```
 switchport trunk allowed vlan 206,220,23,234,250,262,21,283,2086,296,305,323
 switchport trunk allowed vlan add 334,340,342,365,380,404,41,414,42,421,434
 switchport trunk allowed vlan add 461,472,499,509,29,535,544,551,552,55,595
 switchport trunk allowed vlan add 642,672,690,697,701,704,711,800,2018,2020
 switchport trunk allowed vlan add 2054
 switchport mode trunk

```

I want to extract all the vlan numbers between **switchport trunk allowed vlan** and **switchport mode trunk**

I think that the pattern should be like:

```
switchport trunk allowed vlan (\S*) ((\d+),*)+(?:.|\n)

```

but don't know how to extract the other numbers (only the first one matched)

I use the pattern in `PHP` in `preg_match` function.

Answer: 
I tried above solutions but they didn't work for me.

To add a title and description to the documentation you create **ApiInfo** and **Contact** objects like in example below.
Then you simply add **apiInfo** object to your Swagger Docket.

```
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;

@EnableSwagger2
@Configuration
public class SwaggerConfig {

  private Contact contact = new Contact("", "", "");
  private ApiInfo apiInfo = new ApiInfo(
      "Backoffice API documentation",
      "This page documents Backoffice RESTful Web Service Endpoints",
      "1.0",
      "",
      contact,
      "",
      "");

  @Bean
  public Docket api() {
    return new Docket(DocumentationType.SWAGGER_2)
        .apiInfo(apiInfo)
        .select()
        .apis(RequestHandlerSelectors.basePackage(
            PaymentsController.class.getPackage().getName()
        ))
        .paths(PathSelectors.ant("/api/v1/payments" + "/**"))
        .build()
        .useDefaultResponseMessages(false)
        .globalOperationParameters(
            newArrayList(new ParameterBuilder()
                .name("x-authorization")
                .description("X-Authorization")
                .modelRef(new ModelRef("string"))
                .parameterType("header")
                .required(false)
                .build()));
  }
}

```

Above code produces a description like in a screenshot below.

[![screenshot of swagger-ui page produced by code above](https://i.stack.imgur.com/AiWvv.png)](https://i.stack.imgur.com/AiWvv.png)
I too wondered what to do about uses of the deprecated `description` (showing up as warnings in my IDE). 

Well, on closer inspection it turned out that `description` **is not used anywhere in Swagger UI**. After that the solution (in our case\*) became clear: simply remove those descriptions. 

(\*In our codebase, with clean class and method names etc, there was certainly no need for such "API descriptions" for the reader of the code. I would have tolerated having these bits of Swagger-related noise in the codebase if they added some value in Swagger UI, but since they didn't, the only sensible thing was to throw them away.)