Code Monkey home page Code Monkey logo

corellia's People

Contributors

alex-thoma avatar culmat avatar danielgrob avatar dependabot[bot] avatar dweber019 avatar frank-baier avatar joachimprinzbach avatar lazaki avatar markustiede avatar nfricker avatar sauterl avatar schlijo avatar stephansst avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

corellia's Issues

fix ErrorResponse creation issue

Expected Behavior

being able to construct an ErrorResponse from Java

Actual Behavior

Exception due to neither having No-ArgsConstructor nor a JSON creator annotated constructor

Steps to Reproduce the Problem

  1. throw an Exception that should be reported to the consumer, e.g. a ValidationException

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.isequal:4.5.0

Vulnerabilities

DepShield reports that this application's usage of lodash.isequal:4.5.0 results in the following vulnerability(s):


Occurrences

lodash.isequal:4.5.0 is a transitive dependency introduced by the following direct dependency(s):

api-spec-converter:2.7.32
        └─ sway:2.0.5
              └─ z-schema:3.25.1
                    └─ lodash.isequal:4.5.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Fixing MessageBodyWriter issues

Actual Behavior

Calling the Rest Endpoints leads to Resteasy Exceptions like this:
Caused by: org.jboss.resteasy.core.NoMessageBodyWriterFoundFailure: Could not find MessageBodyWriter for response object of type: ch.baloise.corellia.api.entities.ErrorResponse of media type: application/octet-stream at org.jboss.resteasy.core.ServerResponseWriter.writeNomapResponse(ServerResponseWriter.java:110) at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:187) ... 56 more

Enable sending companies without UID

Expected Behavior

The only information missing for a company to be processed automatically without providing a UID is the legal form information.

Actual Behavior

Currently a company has to provide a UID to be found and processed by our systems.

Implementation

Add field legalForm to the company model.

The field should be validated. Either the UID or the other information incl. legalForm should be available.

The valid values for this field is the crediForm list:

Code Description
01 Privatperson
10 Einzelunternehmen
15 Gewerbebetrieb
20 Einfache Gesellschaft
21 Kollektivgesellschaft
22 Kommanditgesellschaft
23 Treuhänderschaft/Treuunternehmen
25 Erbengemeinschaft
29 Europäische Gesellschaft
30 Genossenschaft
31 Aktiengesellschaft
32 Kommandit Aktiengesellschaft
33 GmbH
34 Stiftung
36 Verein
38 Anstalt LI
40 Formloser Bericht
41 Zweigniederl. ausländ.Gesellsch.
55 Institut des öffentl. Rechts

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash.get:4.4.2

Vulnerabilities

DepShield reports that this application's usage of lodash.get:4.4.2 results in the following vulnerability(s):


Occurrences

lodash.get:4.4.2 is a transitive dependency introduced by the following direct dependency(s):

api-spec-converter:2.7.32
        └─ sway:2.0.5
              └─ z-schema:3.25.1
                    └─ lodash.get:4.4.2

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.5) Vulnerability due to usage of org.yaml:snakeyaml:1.24

Vulnerabilities

DepShield reports that this application's usage of org.yaml:snakeyaml:1.24 results in the following vulnerability(s):


Occurrences

org.yaml:snakeyaml:1.24 is a transitive dependency introduced by the following direct dependency(s):

io.swagger.core.v3:swagger-jaxrs2:2.1.0
        └─ io.swagger.core.v3:swagger-integration:2.1.0
              └─ io.swagger.core.v3:swagger-core:2.1.0
                    └─ com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.10.1
                          └─ org.yaml:snakeyaml:1.24

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

[DepShield] (CVSS 7.4) Vulnerability due to usage of lodash:4.17.19

Vulnerabilities

DepShield reports that this application's usage of lodash:4.17.19 results in the following vulnerability(s):


Occurrences

lodash:4.17.19 is a transitive dependency introduced by the following direct dependency(s):

api-spec-converter:2.7.32
        └─ google-discovery-to-swagger:2.0.0
              └─ lodash:4.17.19
        └─ lodash:4.17.19
        └─ raml-to-swagger:1.1.0
              └─ lodash:4.17.19
        └─ sway:2.0.5
              └─ json-refs:3.0.12
                    └─ graphlib:2.1.7
                          └─ lodash:4.17.19
                    └─ lodash:4.17.19
              └─ lodash:4.17.19

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Default Constructor for ErrorResponse

Expected Behavior

Add a default constructor to ErrorResponse class to enable Java reflection, which is used in most REST clients.

Actual Behavior

Steps to Reproduce the Problem

Specifications

  • Version:
  • Platform:
  • Subsystem:

[DepShield] (CVSS 7.5) Vulnerability due to usage of mem:1.1.0

Vulnerabilities

DepShield reports that this application's usage of mem:1.1.0 results in the following vulnerability(s):


Occurrences

mem:1.1.0 is a transitive dependency introduced by the following direct dependency(s):

api-spec-converter:2.7.32
        └─ swagger2openapi:2.9.4
              └─ yargs:9.0.1
                    └─ os-locale:2.1.0
                          └─ mem:1.1.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Align ErrorResponse with HTTP status codes

The http status codes
https://www.restapitutorial.com/httpstatuscodes.html
are the main indicator for error analysis.
To make it easier to distinguish errors we want to change the ErrorCause in our ErrorResponse as follows:

So far we had 2 Causes:

  • badRequest
  • inputValidation

We want to change that to

  • httpClientError -> Errors like wrong formatted json, or related to message body handling errors of our rest library, except validation errors
  • httpClientErrorInputValidation -> It's a httpClientError but because it's a validation problem we treat this different (structured validation error messages).
  • httpServerError -> Some other cause beside of messagebody handling and validation, not data related.

This means inputValidation will have httpClientErrorInputValidation as cause and badRequest will have httpClientError or httpServerError as cause.

This will reflect the http status codes 4xx to httpClientError and 5xx to httpServerError.
Before badRequest coud be 4xx or 5xxx.

Fix uppercase/lowercase issue with enum instantiation

Expected Behavior

being able to provide lower or upper case String as enum values

Actual Behavior

Exception:
com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not deserialize value of type ch.baloise.corellia.api.entities.Document$MediaType from String "application_pdf": value not one of declared Enum instance names: [IMAGE_GIF, IMAGE_BMP, APPLICATION_PDF, IMAGE_PNG, IMAGE_TIFF, IMAGE_JPEG]
at [Source: ch.basler.common.service.camel.helper.ServletByteArrayInputStream@64cbf1ac; line: 3, column: 15] (through reference chain: ch.baloise.corellia.api.entities.Document["mediaType"])

Steps to Reproduce the Problem

use lowercase MediaType string in JSON-Request

add support for cancellation

Expected Behavior

API should provide support for contract cancellations

Actual Behavior

no op available

Specifications

  • Version: stays 1.0 - additional operation

API doc update required.

Expected Behavior

API doc update required.

Currently, the Contract object has date properties, and API docs are missing time zone information in which date should be send.

  1. I suggest using UTC timezone.

I suggest:

  • creationDate - the day the contract was issued. ISO 8601 UTC.
  • startDate - Start of contract which means start of insurance coverage. ISO 8601 UTC.
  • endDate - End of contract which means end of insurance coverage. ISO 8601 UTC.

Btw, supporting hours and minutes - would make sense and make data more precise.
E.g. sending date as 2019-12-17T10:28:21Z

Broken README.md file

There are duplicate chapters; broken layouts and redundant / outdated descriptions.

Support caller identification - add unique caller id

We want to be able to identify the caller clearly and simply.
Therefore we propose to add a unique caller id field on the request structure.
The unique caller id will be determined by the callee (in our case Basler).

Describe exact image format (base64)

Expected Behavior

The image format is properly described in our OpenAPI spec.

Actual Behavior

The current description is not necessarily easy to understand.

Make language mandatory

Currently language is an optional field - which is not true from a business perspective.
We will fix this in the next upcoming version by making a language mandatory.

Extend contract API to conform to LW use cases

The following field have to be added to the create contract API endpoint.

Fields

  • transaction
    -- type
    -- reason
    -- effective (optional)
  • contract
    -- id (was the contractId before)
    -- type
  • termsOfService
    -- type
    -- year
  • payment
    -- code (was the paymentCode before)
    -- recurringType
    -- dueDate (optional)
  • stampTax
  • product.coverables.riskLocation
  • roles.role

Example JSON

{
	...
	"transaction": {
		"type": 21,
		"reason": 51,
		"effective": "2019-11-07"
	},
	"contract": {
		"id": "EXT-TEST-001",
		"type": "EXT"
	},
	"termsOfService": {
		"type": 1368,
		"year": 2019
	},
	"payment": {
		"code": 1234,
		"recurringType": 211,
		"dueDate": "2019-11-07"
	},
	"stampTaxCode": 1801,
        "products": [
                ...
                "coverables": [
                        {
                                ...
                                "riskLocation": {
                                        "street": "Gartenstrasse",
                                        "houseNumber": "95",
                                        "zipCode": "4052",
                                        "city": "Basel"
                                }
                        }
                ]
                ...
        ],
        "roles": [
                {
                        "partnerNr": "any-partner-nr"
                }
        ]
	...
}

[DepShield] (CVSS 7.5) Vulnerability due to usage of yargs-parser:7.0.0

Vulnerabilities

DepShield reports that this application's usage of yargs-parser:7.0.0 results in the following vulnerability(s):


Occurrences

yargs-parser:7.0.0 is a transitive dependency introduced by the following direct dependency(s):

api-spec-converter:2.7.32
        └─ swagger2openapi:2.9.4
              └─ yargs:9.0.1
                    └─ yargs-parser:7.0.0

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Add sample requests / payload

Expected Behavior

As a user / evaluator of this web API I'd like to have a couple of good samples requests / payload to easily see what to send / receive.

Actual Behavior

There are no such examples available.

[DepShield] (CVSS 6.5) Vulnerability due to usage of static-eval:0.2.3

Vulnerabilities

DepShield reports that this application's usage of static-eval:0.2.3 results in the following vulnerability(s):


Occurrences

static-eval:0.2.3 is a transitive dependency introduced by the following direct dependency(s):

api-spec-converter:2.7.32
        └─ google-discovery-to-swagger:2.0.0
              └─ jsonpath:0.2.12
                    └─ static-eval:0.2.3

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Simplify role model - remove person and company from payment

Due to an evolvement in business requirements we would like to remove Person and Company from the Payment entity.

As by this change the Payment entity now only will consist of one field, we propose to remove the entire payment entity and to pull up the paymentCode to Contract level.

[DepShield] (CVSS 5.9) Vulnerability due to usage of com.fasterxml.jackson.core:jackson-databind:2.9.9

Vulnerabilities

DepShield reports that this application's usage of com.fasterxml.jackson.core:jackson-databind:2.9.9 results in the following vulnerability(s):

This is an automated GitHub Issue created by Sonatype DepShield. Details on managing GitHub Apps, including DepShield, are available for personal and organization accounts. Please submit questions or feedback about DepShield to the Sonatype DepShield Community.

Remove Codacy checks

Expected Behavior

Codacy and SonarQube lead to similar results.

Actual Behavior

They have contradictory results; hence I'd like to stay with the sonarqube findings / standards for now.

Steps to Reproduce the Problem

  1. Run checks in Codacy
  2. Run checks in SonarCube
  3. E.g. (default) constructor rules conflict.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.