Giter Club home page Giter Club logo

oscm-rest-api's People

Contributors

adamczykba avatar crystalzord avatar cworf91 avatar dependabot[bot] avatar goebell avatar kowalczyka avatar mchudy-fujitsu avatar miethanerr avatar oscm-automaton avatar piotr-k8i avatar skulle avatar weiser-r avatar

Stargazers

 avatar  avatar

Watchers

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

Forkers

goebell

oscm-rest-api's Issues

Improve TravisCI script

Summary
Right now, travis configuration consists only of running the tests. Let's improve it to work efficiently and provide more error-safety

Details
TBD

Acceptance criteria

  • travis yaml should allow maven dependency caching
  • build stages are required
  • automatic code formatting should be enabled for this project

Additional context
TBD

Use dependency management in project's POMs

Summary
Instead of providing version numbers for commonly used dependencies in each sub-project, let's centralize it in master POM, using dependency management.

Details
TBD

Acceptance criteria

  • dependency management is in use

Additional context
TBD

Move access configuration from web.xml to Java Config wherever possible

Summary
Right now, authorization configuration for REST API modules are provided inside of web.xml.
It is needed to check (and if possible - apply) wether it is possible to replace this web.xml config with java configuration.

Details
N/A

Acceptance criteria

  • check if it possible to configure rest api acces in java config
    • all modules have configuration in java classes

Additional context
N/A

REST API modules deployment through Jenkins job

Summary
Right now, in order to deploy one of REST API module to oscm-core virtual machine it is necessary to perform all the steps manually.
REST API modules should be automatically built and deployed in scope of exsting Jenkins job

Details
N/A

Acceptance criteria
Following REST API modules are automatically deployable by Jenkins job:
- [x] oscm-rest-api-account
- [ ] oscm-rest-api-event
- [x] oscm-rest-api-identity
- [x] oscm-rest-api-marketplace
- [x] oscm-rest-api-operation
- [x] oscm-rest-api-service
- [ ] oscm-rest-api-subscription

Following #90:

  • oscm-rest-api

Additional context
N/A

[Subscription] Improve error handling

Summary
Right now, error messages that are delivered though API request are not meaningful at all.
We should review them and make it so end user actually knows what went wrong.

Details
N/A

Acceptance criteria

  • error handling is reviewed
  • error messages are more meningfull (no generic error messages!)
  • proper error codes are used - 4xx for internal errors, 5xx for external errors

Additional context
N/A

Add SonarQube support for oscm-rest-api

Summary
To ensure higher code quality let's introduce SonarQube support for this repository.

Details
TBD

Acceptance criteria
TBD

Additional context

  • check wether it is fine to block the build on travis, when quality gate is not met

Remove duplicate representations

Summary
There are some Representation-type classes that are duplicated. Let's merge/remove them up.

Details
N/A

Acceptance criteria

  • There is only one Representation class of each type
  • all representations and parameter classes are moved to commons module
  • respective test classes are also moved to commons package
  • code coverage is not decreased

Additional context

  • it's best for this task to be completed after integration tests are done - this will ensure integrity
  • Some example duplicates:
    obraz

[Subscription] Provide integration tests for API

Summary
End-to-end tests should be provided for this module, to make sure that every endpoint works properly

Details
Integration tests should be implemented in form of separate maven submodule.
Worth noting is hovever that, due to submodules packaging being set to war it's not possible to use internal dependencies in this new submodule OOTB, as Maven uses jar packacking for dependencies.
It is needed to find a solution (maybe some configuration in POM?) for that issue.

Acceptance criteria

  • every endpoint has it's own integrations tests
  • *Backend classes are covered by tests

Additional context

Move marked methods to parent classes

Summary
In several places in the code there are methods marked with FIXME tag.
They are supposed to be moved to parent class.

Details
N/A

Acceptance criteria

  • methods marked as FIXME are moved to their respective parent classes
  • there are no methods explicitly destined to be moved to parent class in the code

Additional context
Add any other context or screenshots about the task.
obraz

[Marketplace] Provide integration tests for API

Summary
End-to-end tests should be provided for this module, to make sure that every endpoint works properly

Details
Integration tests should be implemented in form of separate maven submodule.
Worth noting is hovever that, due to submodules packaging being set to war it's not possible to use internal dependencies in this new submodule OOTB, as Maven uses jar packacking for dependencies.
It is needed to find a solution (maybe some configuration in POM?) for that issue.

Acceptance criteria

  • every endpoint has it's own integrations tests
  • *Backend classes are covered by tests

Additional context

Test deploy oscm-rest-api-account.war

Task:

  • Test deployment of war file in tomee and investigate required adaption if any
  • Test retrieving an existing organiztion: Build resource URL from yaml file (/organizations/{id}) and test access in the browser

[Account] Provide integration tests for API

Summary
End-to-end tests should be provided for this module, to make sure that every endpoint works properly

Details
Integration tests should be implemented in form of separate maven submodule.
Worth noting is hovever that, due to submodules packaging being set to war it's not possible to use internal dependencies in this new submodule OOTB, as Maven uses jar packacking for dependencies.
It is needed to find a solution (maybe some configuration in POM?) for that issue.

Acceptance criteria

  • every endpoint has it's own integrations tests
  • *Backend classes are covered by tests

Additional context

[Event] Swagger documentation

Summary
Swagger documentation should be provided for Event API endpoints

Details
N/A

Acceptance criteria

  • Event API module has its own Swagger documentation
  • Swagger version is updated to the latest one
  • Mandatory parameters are documented

Additional context

  • there are some swagger-related filed that can be used as a guideline (ex. account-service-rest-api.yaml)
  • swagger documentation should be configured using Java annotations

Upgrade to jersey 2.0

By migrating to JEE 7 in OSCM v17.0 the core REST APIs have been upgraded to JAX-RS 2.0 requiring jersey 2.0. In order to compile with latest OSCM, the contained dependent API projects need to be upgraded as well.

[Identity] Swagger documentation

Summary****Summary
Swagger documentation should be provided for Identity API endpoints

Details
N/A

Acceptance criteria

  • Identity API module has its own Swagger documentation
  • Swagger version is updated to the latest one
  • Mandatory parameters are documented

Additional context

  • there are some swagger-related filed that can be used as a guideline (ex. account-service-rest-api.yaml)
  • swagger documentation should be configured using Java annotations

Clear description or/and business justification of what the task is about.

Details
If applicable, detailed information regarding things to be considered, requirements etc.

Acceptance criteria
Precise and detailed conditions under which the task is considered to be completed.

Additional context
Add any other context or screenshots about the task.

Travis builds are failing

Describe the bug
From PR #80 travis builds begant to fail. The build on the branch passed (thus it was possible to merge the PR), but when post-merge build was triggered on master - it failed due to some unexpected exeption (see the screenshot). It is necessary to fix that issue as it basically blocks all the merges and renders the CI unusable.

To Reproduce
Steps to reproduce the behavior:

  1. Create new branch
  2. Create commit and push it
  3. Go to travis page for your build
  4. See build failing

Expected behavior
When there is no issue with the code itself, builds should pass

Observed behavior
All builds are failing even before attempting to run the maven goals

Screenshots
obraz

Additional context

[Subscription] Swagger documentation

Summary
Swagger documentation should be provided for Subscription API endpoints

Details
N/A

Acceptance criteria

  • Subscription API module has its own Swagger documentation
  • Swagger version is updated to the latest one
  • Mandatory parameters are documented

Additional context

  • there are some swagger-related filed that can be used as a guideline (ex. account-service-rest-api.yaml)
  • swagger documentation should be configured using Java annotations

Adapt Event REST API deployment for TomEE

Summary
After initial investigation, the single war package for event related API is deployable after aligning module's web.xml configuration.

Details
org.oscm.rest.common.BasicAuthFilter does not exist in any of the project dependencies. It leads to problem with API deployment. After removing it deployment is possible, but the API is not working as there is no authentication provided - OSCM's EJBs which are used underneath require proper user roles. Such authentication filter must be reintroduced.

Acceptance criteria

  • OSCM EVENT REST API war is deployable inside existing oscm-core container
  • it is possible to access API using BASIC authentication
  • endpoints functionality is verified

Additional context
N/A

Implement unit tests for Service API

Unit tests have to be implemented for oscm-rest-api-service submodule.

Details
N/A

Acceptance criteria

  • overall code coverage is at least 60%

Unit tests for following submodules are implemented:

  • oscm-rest-api-service

Additional context:
N/A

Adapt Marketplace REST API deployment for TomEE

Summary
After initial investigation, the single war package for marketplace related API is deployable after aligning module's web.xml configuration.

Details
org.oscm.rest.common.BasicAuthFilter does not exist in any of the project dependencies. It leads to problem with API deployment. After removing it deployment is possible, but the API is not working as there is no authentication provided - OSCM's EJBs which are used underneath require proper user roles. Such authentication filter must be reintroduced.

Acceptance criteria

  • OSCM MARKETPLACE REST API war is deployable inside existing oscm-core container
  • it is possible to access API using BASIC authentication
  • endpoints functionality is verified

Additional context
N/A

Adapt Subscription REST API deployment for TomEE

Summary
After initial investigation, the single war package for subscription related API is deployable after aligning module's web.xml configuration.

Details
org.oscm.rest.common.BasicAuthFilter does not exist in any of the project dependencies. It leads to problem with API deployment. After removing it deployment is possible, but the API is not working as there is no authentication provided - OSCM's EJBs which are used underneath require proper user roles. Such authentication filter must be reintroduced.

Acceptance criteria

  • OSCM SUBSCRIPTION REST API war is deployable inside existing oscm-core container
  • it is possible to access API using BASIC authentication
  • endpoints functionality is verified

Additional context
N/A

Implement unit tests for Subscription API

Unit tests have to be implemented for oscm-rest-api-subscription submodule.

Details
N/A

Acceptance criteria

  • overall code coverage is at least 60%

Unit tests for following submodules are implemented:

  • oscm-rest-api-subscription

Additional context:
No

[Account] Swagger documentation

Summary
Swagger documentation should be provided for Account API endpoints

Details
N/A

Acceptance criteria

  • Account API module has its own Swagger documentation
  • Swagger version is updated to the latest one
  • Mandatory parameters are documented

Additional context

  • there are some swagger-related filed that can be used as a guideline (ex. account-service-rest-api.yaml)
  • swagger documentation should be configured using Java annotations

Implement unit tests for Account API and Identity API

Unit tests have to be implemented for oscm-rest-api-account and oscm-rest-api-identity submodules.

Details
No

Acceptance criteria

  • overall code coverage is at least 60%

Unit tests for following submodules are implemented:

  • oscm-rest-api-account
  • oscm-rest-api-identity

Additional context:
No

Remove oscm-commons

Remove dependency to com.github.servicecatalog.oscm-commons. Check shared modules from oscm-commons and integrate those which are needed here.

Also, move oscm-rest-api-commons module to this repo

See servicecatalog/oscm-commons#5

Adapt Account REST API deployment for TomEE

Summary
After initial investigation, the single war package for account related API is deployable aliging module's web.xml configuration.

Details
org.oscm.rest.common.BasicAuthFilter does not exist in any of the project dependencies. It leads to problem with API deployment. After removing it deployment is possible, but the API is not working as there is no authentication provided - OSCM's EJBs which are used underneath require proper user roles. Such authentication filter must be reintroduced.

Acceptance criteria

  • OSCM ACCOUNT REST API war is deployable inside existing oscm-core container
  • it is possible to access API using BASIC authentication
  • endpoints functionality is verified

Additional context
N/A

Implement unit tests for Event API

Unit tests have to be implemented for oscm-rest-api-event submodule.

Details
N/A

Acceptance criteria

  • overall code coverage is at least 60%

Unit tests for following submodules are implemented:

  • oscm-rest-api-event

Additional context:
N/A

[Event] Provide integration tests for API

Summary
End-to-end tests should be provided for this module, to make sure that every endpoint works properly

Details
Integration tests should be implemented in form of separate maven submodule.
Worth noting is hovever that, due to submodules packaging being set to war it's not possible to use internal dependencies in this new submodule OOTB, as Maven uses jar packacking for dependencies.
It is needed to find a solution (maybe some configuration in POM?) for that issue.

Acceptance criteria

  • every endpoint has it's own integrations tests
  • *Backend classes are covered by tests

Additional context

Adapt Identity REST API deployment for TomEE

Summary
After initial investigation, the single war package for identity related API is deployable after aligning module's web.xml configuration.

Details
org.oscm.rest.common.BasicAuthFilter does not exist in any of the project dependencies. It leads to problem with API deployment. After removing it deployment is possible, but the API is not working as there is no authentication provided - OSCM's EJBs which are used underneath require proper user roles. Such authentication filter must be reintroduced.

Acceptance criteria

  • OSCM IDENTITY REST API war is deployable inside existing oscm-core container
  • it is possible to access API using BASIC authentication
  • endpoints functionality is verified

Additional context
N/A

Refactor/cleanup unit tests

Summary
In order for this repos unit tests to be consistent, let's recheck and improve the code whereever possible.

Details
N/A

Acceptance criteria

  • overall code coverage is at least 70%
  • unit tests for following modules are checked and refactored (if applicable)
    • oscm-rest-commons
    • oscm-rest-account
    • oscm-rest-identity
    • oscm-rest-marketplace
    • oscm-rest-operation
    • oscm-rest-service

Additional context
N/A

Adapt Operation REST API deployment for TomEE

Summary
After initial investigation, the single war package for operation related API is deployable after aligning module's web.xml configuration.

Details
org.oscm.rest.common.BasicAuthFilter does not exist in any of the project dependencies. It leads to problem with API deployment. After removing it deployment is possible, but the API is not working as there is no authentication provided - OSCM's EJBs which are used underneath require proper user roles. Such authentication filter must be reintroduced.

Acceptance criteria

  • OSCM OPERATION REST API war is deployable inside existing oscm-core container
  • it is possible to access API using BASIC authentication
  • endpoints functionality is verified

Additional context
N/A

[Service] Improve error handling

Summary
Right now, error messages that are delivered though API request are not meaningful at all.
We should review them and make it so end user actually knows what went wrong.

Details
N/A

Acceptance criteria

  • error handling is reviewed
  • error messages are more meningfull (no generic error messages!)
  • proper error codes are used - 4xx for internal errors, 5xx for external errors

Additional context
N/A

Implement unit tests for Operation API

Unit tests have to be implemented for oscm-rest-api-operation submodule.

Details
No

Acceptance criteria

  • overall code coverage is at least 60%

Unit tests for following submodules are implemented:

  • oscm-rest-api-operation

Additional context:
No

Maven build from OSCM binaries

Building the API from source requires an OSCM workspace and with contained ANT based scripts. Instead of later dependency provide for a separate maven build from OSCM binaries.

[Services] Provide integration tests for API

Summary
End-to-end tests should be provided for this module, to make sure that every endpoint works properly

Details
Integration tests should be implemented in form of separate maven submodule.
Worth noting is hovever that, due to submodules packaging being set to war it's not possible to use internal dependencies in this new submodule OOTB, as Maven uses jar packacking for dependencies.
It is needed to find a solution (maybe some configuration in POM?) for that issue.

Acceptance criteria

  • every endpoint has it's own integrations tests
  • *Backend classes are covered by tests

Additional context

Provide Readme

Provide for description in this repository readme on how to deploy the API with latest OSCM.

Summary
I think it would be a good idea to write a few lines of documentation in the README file.

Acceptance criteria
Readme is informing about simple details, such as where it is deployed or how to access Swagger UI after it is merged to master.

Additional context
I think it should be done after merging swagger branch to master.

[Identity] Provide integration tests for API

Summary
End-to-end tests should be provided for this module, to make sure that every endpoint works properly

Details
Integration tests should be implemented in form of separate maven submodule.
Worth noting is hovever that, due to submodules packaging being set to war it's not possible to use internal dependencies in this new submodule OOTB, as Maven uses jar packacking for dependencies.
It is needed to find a solution (maybe some configuration in POM?) for that issue.

Acceptance criteria

  • every endpoint has it's own integrations tests
  • *Backend classes are covered by tests

Additional context

Implement tests for *Backend classes

Summary
As Integration tests are most likely needed to be performed outside of travis flow, code coverage coming from them will not by countend towards overall code coverage.
It is needed then to provide unit-like tests for that purpose.

Details
N/A

Acceptance criteria

  • all * Backend-type classes have code coverage

Additional context
N/A

Implement unit tests for Marketplace API

Unit tests have to be implemented for oscm-rest-api-marketplace submodule.

Details
No

Acceptance criteria

  • overall code coverage is at least 60%

Unit tests for following submodules are implemented:

  • oscm-rest-api-marketplace

Additional context:
No

[Operation] Provide integration tests for API

Summary
End-to-end tests should be provided for this module, to make sure that every endpoint works properly

Details
Integration tests should be implemented in form of separate maven submodule.
Worth noting is hovever that, due to submodules packaging being set to war it's not possible to use internal dependencies in this new submodule OOTB, as Maven uses jar packacking for dependencies.
It is needed to find a solution (maybe some configuration in POM?) for that issue.

Acceptance criteria

  • every endpoint has it's own integrations tests
  • *Backend classes are covered by tests

Additional context

[Services] Swagger documentation

Summary
Swagger documentation should be provided for Service API endpoints

Details
N/A

Acceptance criteria

  • Service API module has its own Swagger documentation
  • Swagger version is updated to the latest one
  • Mandatory parameters are documented

Additional context

  • there are some swagger-related filed that can be used as a guideline (ex. account-service-rest-api.yaml)
  • swagger documentation should be configured using Java annotations

Pull Requests are being merged without explicit user confirmation

Describe the bug
We've noticed that sometimes pull requests are being merged automatically without confirmation from the user.

To Reproduce
There are no specific steps yet. Let's observe the repository and try to find something that's common for all of the cases.

Expected behavior
Pull Requests are merged only after all checks have passed and user responsible for merging particular PR, explicitly triggered the merging action.

Observed behavior
Pull Requests are being merged without user explicit approval and even no checks have passed.

Screenshots
obraz
obraz
obraz

Additional context

  • the issue does not appear on main oscm repository
  • for now branch protection settings are the same as on the main oscm repo, but checks are enforced on administrative users also

[Marketplace] Swagger documentation

Summary
Swagger documentation should be provided for Marketplace API endpoints

Details
N/A

Acceptance criteria

  • Marketplace API module has its own Swagger documentation
  • Swagger version is updated to the latest one
  • Mandatory parameters are documented

Additional context

  • there are some swagger-related filed that can be used as a guideline (ex. account-service-rest-api.yaml)
  • swagger documentation should be configured using Java annotations

Replace anonymous classes with lambdas

Summary
It is possible to replace anonymous classes with lambda expressions (ex. in .EventBackend#24)
Let's do this in separate task to keep the code clean and changes transparent.

Details
N/A

Acceptance criteria
Lambda expressions are used instead of anonymous classes

Additional context

Before:
obraz

After:
obraz

[Operation] Swagger documentation

Summary
Swagger documentation should be provided for Operation API endpoints

Details
N/A

Acceptance criteria

  • Operation API module has its own Swagger documentation
  • Swagger version is updated to the latest one
  • Mandatory parameters are documented

Additional context

  • there are some swagger-related filed that can be used as a guideline (ex. account-service-rest-api.yaml)
  • swagger documentation should be configured using Java annotations

Adapt Service REST API deployment for TomEE

Summary
After initial investigation, the single war package for service related API is deployable after aligning module's web.xml configuration.

Details
org.oscm.rest.common.BasicAuthFilter does not exist in any of the project dependencies. It leads to problem with API deployment. After removing it deployment is possible, but the API is not working as there is no authentication provided - OSCM's EJBs which are used underneath require proper user roles. Such authentication filter must be reintroduced.

Acceptance criteria

  • OSCM SERVICE REST API war is deployable inside existing oscm-core container
  • it is possible to access API using BASIC authentication
  • endpoints functionality is verified

Additional context
N/A

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.