• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ExpediaGroup / beekeeper / #546

25 Oct 2024 07:55AM UTC coverage: 87.201% (+0.1%) from 87.068%
#546

push

web-flow
Fix bad request handling (#179)

* update controller to use ParameterObject

As used in the metadata endpoint we want Swagger to be  able to interpret and automatically generate pagination parameters like page, size, and sort.

* Add error handling for incorrect sort value

* Add test for error handling

* Fix workflow to only release main branch to maven central

* Update CHANGELOG.md

* Add unit test for BeeekeeperExceptionHandler

Testing the request response and the errorResponses

* Implement builder pattern for ErrorResponse

---------

Co-authored-by: Hamza Jugon <hjugon@expediagroup.com>
Co-authored-by: Jay Green-Stevens <jgreenstevens@expediagroup.com>

15 of 15 new or added lines in 2 files covered. (100.0%)

1 existing line in 1 file now uncovered.

1274 of 1461 relevant lines covered (87.2%)

0.87 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/beekeeper-api/src/main/java/com/expediagroup/beekeeper/api/BeekeeperApiApplication.java
1
/**
2
 * Copyright (C) 2019-2021 Expedia, Inc.
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 * http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package com.expediagroup.beekeeper.api;
17

18
import org.springframework.boot.autoconfigure.SpringBootApplication;
19
import org.springframework.boot.autoconfigure.domain.EntityScan;
20
import org.springframework.boot.builder.SpringApplicationBuilder;
21
import org.springframework.boot.context.properties.EnableConfigurationProperties;
22
import org.springframework.context.annotation.ComponentScan;
23
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
24

25
@SpringBootApplication
26
@EnableConfigurationProperties
27
@EntityScan(basePackages = { "com.expediagroup.beekeeper.core.model" })
28
@EnableJpaRepositories(basePackages = { "com.expediagroup.beekeeper.core.repository" })
29
@ComponentScan(basePackages = {
30
    "com.expediagroup.beekeeper.api.conf",
31
    "com.expediagroup.beekeeper.api.controller",
32
    "com.expediagroup.beekeeper.api.service",
33
    "com.expediagroup.beekeeper.api.error" })
UNCOV
34
public class BeekeeperApiApplication {
×
35
  public static void main(String[] args) {
36
    new SpringApplicationBuilder(BeekeeperApiApplication.class)
×
37
        .properties("server.port:${endpoint.port:7008}")
×
38
        .build()
×
39
        .run(args);
×
40
  }
×
41
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc