diff --git a/jdk_21_maven/cs/rest-gui/microcks/.editorconfig b/jdk_21_maven/cs/rest-gui/microcks/.editorconfig
new file mode 100644
index 000000000..c2cdfb8ad
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/.editorconfig
@@ -0,0 +1,21 @@
+# EditorConfig helps developers define and maintain consistent
+# coding styles between different editors and IDEs
+# editorconfig.org
+
+root = true
+
+
+[*]
+
+# Change these settings to your own preference
+indent_style = space
+indent_size = 2
+
+# We recommend you to keep these unchanged
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false
diff --git a/jdk_21_maven/cs/rest-gui/microcks/.jshintrc b/jdk_21_maven/cs/rest-gui/microcks/.jshintrc
new file mode 100644
index 000000000..f75096980
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/.jshintrc
@@ -0,0 +1,23 @@
+{
+ "node": true,
+ "browser": true,
+ "esnext": true,
+ "bitwise": true,
+ "camelcase": true,
+ "curly": true,
+ "eqeqeq": true,
+ "immed": true,
+ "indent": 2,
+ "latedef": true,
+ "newcap": true,
+ "noarg": true,
+ "quotmark": "single",
+ "undef": true,
+ "unused": true,
+ "strict": true,
+ "trailing": true,
+ "smarttabs": true,
+ "globals": {
+ "angular": false
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/ADOPTERS.md b/jdk_21_maven/cs/rest-gui/microcks/ADOPTERS.md
new file mode 100644
index 000000000..967e6aee1
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/ADOPTERS.md
@@ -0,0 +1,47 @@
+> [!IMPORTANT]
+> This file is automatically synchronized across Microcks organization repositories. To make edits, please submit a PR to the source repository: https://github.com/microcks/.github/edit/main/ADOPTERS.md
+
+# Adopters
+
+**📢 _If you're using Microcks in your organization, please add your company name to this list. 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a significant impact._**
+
+Respect is a core principle in our open source community; see our [Code of Conduct](https://github.com/microcks/.github/blob/main/CODE_OF_CONDUCT.md). We value your contributions and rely on your input, and we believe we can achieve more together.
+
+If you need to know why and how to add yourself to the list, please read the blog post "[Join the Microcks Adopters list](https://microcks.io/blog/join-adopters-list/) and Empower the vibrant open source Community 🙌"
+
+This document also lists the organizations using Microcks based on public information in blog posts, events, and videos. If any organization would like to get added or removed, please edit this file (make a pull request) after following our [contribution guide](https://github.com/microcks/.github/blob/master/CONTRIBUTING.md) and by following these specifics guidelines:
+- Kindly include a reference (such as a link to a public blog post, video, slides, etc.) that mentions using Microcks.
+- You consent to have your company’s name and logo featured on the [Microcks.io website](https://microcks.io/), included in our adopters' section, and potentially displayed in our rotating logo carousel.
+- Adopter type follows the [CNCF definitions outlined](https://github.com/cncf/toc/blob/main/FAQ.md#what-is-the-definition-of-an-adopter): CNCF `End-User` member, `Another project`, `end user`, `Service Provider` or `Consultancy`.
+
+> You can contact the project [maintainers](https://github.com/microcks/.github/blob/main/MAINTAINERS.md) if you have any questions or need further information.
+
+
+| Organization | Contact | Adopter type | Description of Use / Reference |
+|---------------------|---------------------|---------------------|-----------------------------------------------------------------------------------|
+| [Lombard Odier Group](https://www.lombardodier.com/) | [Ludovic Pourrat](https://github.com/ludovic-pourrat) | `end user` | Multi-protocol API Mocking and Sandbox as a service #APIOps. APIdays Paris 2022 - Adding a mock as a service capability to your API strategy portfolio 👉 [slide deck](https://speakerdeck.com/apidays/apidays-paris-2022-adding-a-mock-as-a-service-capability-to-your-api-strategy-portfolio-ludovic-pourrat-lombard-odier) ⭐️ |
+| [La Poste Groupe](https://www.lapostegroupe.com/) | [Nicolas Matelot](https://www.linkedin.com/in/nicolas-matelot/) [Romain Gil](https://www.linkedin.com/in/romain-gil-8444898a) | `end user` | Cloud-native application development, API Mocking and Sandbox. |
+| [J.B. Hunt](https://www.jbhunt.com/) | [Carol Gschwend](https://github.com/carolgschwend) | `end user` | Accelerating cloud-native application development "The developers of the project mentioned above saved at least 7 months using Microcks. They were not only able to work concurrently but also captured the exact business requirements specified by the product owner in the form of example request/response pairs. These persistent mocks can now be utilized in sandbox environments if needed." See J.B. Hunt ⭐️ [blog post](https://microcks.io/blog/jb-hunt-mock-it-till-you-make-it/) ⭐️ |
+| [Société Générale](https://www.societegenerale.com/en) | [Patrice Lachance](https://github.com/patlachance) | `end user` | Multi-protocol API Mocking, Testing and Sandbox for cloud-native APIs / applications. Cloud Innovation Platform presentation and Microcks demo 👉 [Red Hat Summit 2019](https://www.redhat.com/files/summit/session-assets/2019/T8B6B4.pdf) ⭐️|
+| [Deloitte](https://www.deloitte.com/global/en.html) | [Madiha Rehman](https://www.linkedin.com/in/madihar/) | `End-User` `Consultancy` | Utilised Microcks to create backend mocks for 170+ APIs including REST and SOAP services.|
+| [sesam-vitale](https://www.sesam-vitale.fr/) | [Vincent Fasciaux](mailto:vincent.fasciaux@sesam-vitale.fr) | `end user` | We use Microcks to replace the SUT's dependencies with test doubles in order to accelerate our API deliveries.|
+| [BNP PARIBAS](https://group.bnpparibas/en/) | [Nadji BERRAF](https://www.linkedin.com/in/nadji-berraf-26707148/) | `end user` | We use Microcks since 2022 to mock our legacy core banking systems and mainframe APIs in order to increase agility, accelerate development, and reduce costs. Microcks is also integrated into our API-first strategy for building and delivering new cloud-native services.|
+| [Akwatype](https://akwatype.io) | [Pierre-Michel Bret](https://www.linkedin.com/in/pierre-michel-bret/) | `Service Provider` | Use of Microcks to mock the APIs corresponding to the OpenAPI contracts generated by Akwatype, integration through Git.|
+| [codecentric AG](https://www.codecentric.de) | [Daniel Kocot](https://www.linkedin.com/in/danielkocot/) | `Consultancy` | API Operations pipeline with an integration of Microcks and consulting services around API Mocking and Testing.|
+| [CNAM](https://www.ameli.fr) | [Sébastien Fraigneau](https://www.linkedin.com/in/s%C3%A9bastien-fraigneau-82826a2) | `end user` | Using Microcks to mock SOAP services for the French healthcare system. REST is coming.|
+| [CloudAPPi](https://cloudappi.net) | [Marco Antonio Sanz Molina Prados](https://www.linkedin.com/in/marco-antonio-sanz-molina-prados-09733518/)| `Service Provider` | We manage over 40 APIs strategies in medium and big companies and install Microcks as a mock server. |
+| [Sypid](https://www.sypid.com/) | [Zubair Aslam](https://www.linkedin.com/in/zubes1/)| `Consultancy` | Sypid consultants are highly experienced in the Spec-first approach to API and integration design. We use Microcks to implement this approach effectively. We found the docker extension is specifically useful to get started quickly.|
+| [Inetum Software](https://www.inetum.com/) | [Jérôme Palon](https://www.linkedin.com/in/jpalon/)| `end user` `Consultancy` | We use Microcks as an API centralisation and mock server for the social and civil security division, paving the path for migration to microservices and event-driven cloud architecture.|
+| [Fluent CI](https://fluentci.io/) | [Tsiry Sandratraina](https://github.com/tsirysndr)| `Another project` | We use Microcks to mock and test our REST and GraphQL APIs. We also provide an open source [Microcks module](https://github.com/fluent-ci-templates/microcks-pipeline) for [Dagger](https://dagger.io) and [Fluent CI](https://fluentci.io).|
+| [Nordic Semiconductor](https://nordicsemi.com) | [Patrick Barnes](https://www.linkedin.com/in/patrick-barnes-pdx/) | `end user` | We use Microcks mainly via testcontainers to test the REST APIs (and probably soon, our async, event-based APIs) for the microservices that comprise our IoT platform, [nRFCloud.com](https://nrfcloud.com/). Microcks has been invaluable, and the Microcks team a real pleasure to work with!|
+| [Office national de l'emploi (ONEm)](https://www.onem.be/) | [Samuel Antoine](https://www.linkedin.com/in/samuel-antoine-07347b171/) [Christophe Lopez](https://www.linkedin.com/in/aeoncl/) | `end user` | We use Microcks as both OpenAPI contract testing tool and mock provider.|
+| [Bitso](https://bitso.com/) | [Caio Amaral](https://www.linkedin.com/in/camaral) | `end user` | Microcks supports Bitso's integration and capacity testing infrastructure, allowing us to isolate the applications through well defined gRPC contracts.|
+| [Catena Clearing](https://catenaclearing.io/) | [Andre Sionek](https://www.linkedin.com/in/andresionek) | `end user` | We use Microcks to mock 3rd party APIs so we can develop against them without hitting the real endpoints, Microcks is also used to run integration tests.|
+| [Traefik](https://traefik.io/) | [Emile Vauge](https://github.com/emilevauge) | `Another project` `Service Provider` | We use Microcks in [Traefik’s API sandbox solution](https://traefik.io/solutions/api-mocking/) to enable developers create, publish, and consume mock APIs with production-like UX and SLAs.|
+| [APIQuality](https://apiquality.io/) | [Marco Antonio Sanz](https://www.linkedin.com/in/marco-antonio-sanz-molina-prados-09733518/) [Omar del Valle](https://www.linkedin.com/in/omardelvalle/) | `Service Provider` | Your low code tool to integrate APIOps. Develops secure and quality APIs implementing API First methodology. We use Microcks as our default tool for mocking. Create secure and functional APIs from a single tool!|
+| [Banco PAN](https://www.bancopan.com.br/) | [Renan Elias Saraiva](https://www.linkedin.com/in/renan-elias-28781894/) | `end user` | We leverage Microcks to create a virtual environment, simulating API and AsyncAPI services while seamlessly connecting with our external Kafka cluster for testing purposes. |
+|[ Office des Postes et Télécommunications de Nouvelle-Calédonie](https://www.opt.nc/) | [Adrien SALES](https://www.linkedin.com/in/adrien-sales/) [Vinh Faucher](https://www.linkedin.com/in/vinh-faucher/) [Michèle BARRE](https://www.linkedin.com/in/michelebarre/)| `end user` | API & Kafka Mocking (end users & Github.com CI), see [Microcks for dummies](https://dev.to/optnc/microcks-for-dummies-1imn) on [dev.to/optnc](https://dev.to/optnc) for more information.|
+|[ Bump.sh](https://bump.sh/) | [Christophe Dujarric](https://www.linkedin.com/in/christophedujarric/) [Sebastien Charrier](https://www.linkedin.com/in/sebastiencharrier/)| `Service Provider` | Using Bump.sh and Microcks together allows you to create a clear feedback cycle of [API documentation](https://bump.sh/), testing, simulation, trial implementation, and iteration. [Read more about this](https://bump.sh/blog/microcks-bump-sh-testing-mocking-docs).|
+|[Michelin](https://www.michelin.fr/) | [Alex Picarle](https://github.com/AlexP63) | `End-User` | We use Microcks to elaborate our PoCs, to offer api sandbox or discovery trials and overall promote #DesignFirst approach.|
+|[Amway](https://www.amway.com/) | [Brian Hibma](https://www.linkedin.com/in/brianhibma/) [Sai Bommakanti](https://www.linkedin.com/in/saiabhinay-bommakanti-31014943/) | `end user` | We use Microcks primarily as a platform for API and Event mocking and discovery, integrating it into our DevOps and CI/CD practices, and unblocking parallel, contract-based development from teams. |
+|[BITMARCK](https://www.bitmarck.de) | [Michael Goll](https://github.com/goll-michael) | `end user` | We use Microcks to mock the APIs that correspond to the generated or manually created OpenAPI contracts.|
diff --git a/jdk_21_maven/cs/rest-gui/microcks/BACKERS.md b/jdk_21_maven/cs/rest-gui/microcks/BACKERS.md
new file mode 100644
index 000000000..bf55f6056
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/BACKERS.md
@@ -0,0 +1,46 @@
+# Sponsors & Backers
+
+[Microcks](https://microcks.io/) is a [Cloud Native Computing Foundation Sandbox](https://landscape.cncf.io/?selected=microcks) project 🚀 with its ongoing development made possible entirely by the support of the awesome sponsors and backers listed in this file. If you'd like to join them, please consider [sponsoring](https://opencollective.com/microcks) Microcks's development.
+
+**BTW 📢 _If you're using Microcks in your organization, please add your company name to the adopters list. 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact._**
+https://github.com/microcks/.github/blob/main/ADOPTERS.md
+
+> Platinum💎, gold🥇 and silver🥈 **sponsors**, [join us](https://opencollective.com/microcks) 🙌
+> **Invest** in **your supply chain!**
+
+If you run a business and is using Microcks in a revenue-generating product/service, it would make business sense to sponsor Microcks development: it ensures the project that you rely on a healthy, strong and engaged community. It can also help your exposure in the open source community and makes it easier to attract new talents.
+
+If you'd like to help and support Microcks to [level up](https://www.cncf.io/project-metrics/) within the [CNCF](https://www.cncf.io) and keep growing the open source way, please consider:
+
+- [Become a backer or sponsor on OpenCollective](https://opencollective.com/microcks).
+
+## Special Sponsors
+[image width="350"]: #
+
+
+
+
+## Platinum Sponsors
+[image width="300"]: #
+[Become the first platinum sponsor](https://opencollective.com/microcks/contribute/platinum-sponsors-61341/checkout?interval=month&amount=2000&name=&legalName=&email=)
+
+## Gold Sponsors
+[image width="250"]: #
+[Become the first gold sponsor](hhttps://opencollective.com/microcks/contribute/gold-sponsors-61340/checkout?interval=month&amount=1000&name=&legalName=&email=)
+
+## Silver Sponsors
+[image width="200"]: #
+[Become the first silver sponsor](https://opencollective.com/microcks/contribute/silver-sponsors-61339/checkout?interval=month&amount=500&name=&legalName=&email=)
+
+## Bronze Sponsors
+[image width="150"]: #
+
+
+
+
+
+[Become a bronze sponsor](https://opencollective.com/microcks/contribute/bronze-sponsors-61338/checkout?interval=month&amount=100&name=&legalName=&email=)
+
+## OpenCollective Generous Backers
+
+
diff --git a/jdk_21_maven/cs/rest-gui/microcks/BUILDING.md b/jdk_21_maven/cs/rest-gui/microcks/BUILDING.md
new file mode 100644
index 000000000..1aecc07bd
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/BUILDING.md
@@ -0,0 +1,75 @@
+# Building guide
+
+**Want to contribute and build stuff? Great!** ✨ We try to make it easy, and all contributions, even the smaller ones, are more than welcome. This includes bug reports, fixes, documentation, examples...
+
+First, you may need to read our [global contribution guide](https://github.com/microcks/.github/blob/master/CONTRIBUTING.md) and then to read this page.
+
+## Reporting an issue
+
+This project uses GitHub issues to manage the issues. Open an issue directly in GitHub.
+
+If you believe you found a bug, and it's likely possible, please indicate a way to reproduce it, what you are seeing and what you would expect to see.
+Don't forget to indicate your Java, Maven and/or Docker version.
+
+## Setup
+
+## Build
+
+### Build the whole project
+
+You need to have [Apache Maven](https://maven.apache.org) (version >= 3.5) up and running as well as a valid Java Development Kit (version >= 21) install to build the project.
+
+```
+$ git clone https://github.com/microcks/microcks.git
+[...]
+$ cd microcks
+$ mvn clean install
+[...]
+[INFO] ------------------------------------------------------------------------
+[INFO] Reactor Summary for Microcks 1.12.0-SNAPSHOT:
+[INFO]
+[INFO] Microcks ........................................... SUCCESS [ 0.408 s]
+[INFO] Microcks Model ..................................... SUCCESS [ 1.771 s]
+[INFO] Microcks Util ...................................... SUCCESS [ 4.590 s]
+[INFO] Microcks EL ........................................ SUCCESS [ 1.018 s]
+[INFO] Microcks App ....................................... SUCCESS [ 40.540 s]
+[INFO] Microcks Async Minion .............................. SUCCESS [ 8.425 s]
+[INFO] Microcks Distros ................................... SUCCESS [ 0.034 s]
+[INFO] Microcks Uber App .................................. SUCCESS [ 0.850 s]
+[INFO] Microcks Uber Async Minion ......................... SUCCESS [ 3.818 s]
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESS
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 01:01 min
+[INFO] Finished at: 2025-04-07T18:07:39+02:00
+[INFO] ------------------------------------------------------------------------
+```
+
+### Build and run webapp jar
+
+For now, there's still a problem with Frontend integration tests configuration so you should disable them using the following flag:
+
+```
+$ cd webapp
+$ mvn -Pprod package
+[...]
+$ java -jar target/microcks-x.y.z-SNAPSHOT.jar
+```
+
+### Build and run webapp Docker image
+
+```
+$ cd webapp
+$ mvn -Pprod clean package && docker build -f src/main/docker/Dockerfile -t microcks/microcks-uber:nightly .
+[...]
+$ cd ../install/docker-compose
+$ docker-compose -f docker-compose.yml up -d
+```
+After spinning up the containers, you will now have access to Keycloak for account management, and microcks webapp to setup mocking, etc.
+
+You can login to keycloak on `http://localhost:18080/` with username and password `admin`.
+You can login to microcks webapp with the username `admin` and password `microcks123`.
+
+## Before you contribute
+
+To contribute, use GitHub Pull Requests, from your **own** fork.
\ No newline at end of file
diff --git a/jdk_21_maven/cs/rest-gui/microcks/CHANGELOG.md b/jdk_21_maven/cs/rest-gui/microcks/CHANGELOG.md
new file mode 100644
index 000000000..efa012d9d
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/CHANGELOG.md
@@ -0,0 +1,17 @@
+# CHANGELOG
+
+## Introduction
+
+This file provides a high-level summary of the changes and updates made to the Microcks project.
+
+## Releases
+
+For a comprehensive list of changes, please visit the [official release page](https://github.com/microcks/microcks/releases)
+
+## For More Information
+
+For more detailed release notes, please refer to the [Microcks blog page](https://microcks.io/blog/).
+
+## For specific changes on this repo
+
+Refer to the [activity view](https://docs.github.com/en/repositories/viewing-activity-and-data-for-your-repository/using-the-activity-view-to-see-changes-to-a-repository) of the current repository for detailed information on all recent changes.
diff --git a/jdk_21_maven/cs/rest-gui/microcks/CODEOWNERS b/jdk_21_maven/cs/rest-gui/microcks/CODEOWNERS
new file mode 100644
index 000000000..4f11dde4d
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/CODEOWNERS
@@ -0,0 +1,9 @@
+# This file provides an overview of code owners in this repository.
+
+# Each line is a file pattern followed by one or more owners.
+# The last matching pattern has the most precedence.
+# For more details, read the following article on GitHub: https://help.github.com/articles/about-codeowners/.
+
+# The default owners are automatically added as reviewers when you open a pull request unless different owners are specified in the file.
+
+* @lbroudoux @yada
\ No newline at end of file
diff --git a/jdk_21_maven/cs/rest-gui/microcks/CODE_OF_CONDUCT.md b/jdk_21_maven/cs/rest-gui/microcks/CODE_OF_CONDUCT.md
new file mode 100644
index 000000000..bbbbad7c3
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/CODE_OF_CONDUCT.md
@@ -0,0 +1,35 @@
+# Microcks Community Code of Conduct
+
+Microcks project adheres to the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md), aligning with the values of collaboration, transparency, and inclusivity that define open source.
+
+## Our Pledge
+
+As contributors and maintainers of the Microcks project, we are committed to fostering an open, welcoming, and inclusive environment. By participating in our community, we pledge to:
+
+- Promote a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, experience level, nationality, personal appearance, race, religion, or sexual identity and orientation.
+- Support a spirit of mutual respect, empathy, and cooperation, ensuring that every contribution—big or small—is valued.
+- Encourage collaboration, knowledge-sharing, and continuous learning, as these are the cornerstones of any successful open-source community.
+
+## Our Standards
+
+To ensure a productive, positive experience for all community members, we ask everyone to:
+
+- **Be respectful and considerate**: Engage with others constructively, appreciating the diverse perspectives and ideas within the community.
+- **Be collaborative**: Open-source thrives on shared efforts and diverse input. Offer help where needed and seek help when necessary.
+- **Lead by example**: Encourage new contributors and foster an environment where everyone feels welcome to participate.
+- **Value inclusivity**: Open source is for everyone. Actively support a diverse range of contributors and voices, regardless of background.
+
+## Enforcement
+
+Instances of unacceptable behavior—including harassment, abusive language, or any other forms of misconduct—should be reported to the Microcks project team at **info@microcks.io**.
+
+The project team will:
+- Review and investigate all reports confidentially.
+- Take action deemed appropriate for the situation, including potential temporary or permanent bans from the community.
+- Keep the identity of the reporter confidential, ensuring a safe and respectful process for all involved.
+
+## A Community-Driven Open Source
+
+Microcks thrives because of its open-source community. We encourage all members to actively contribute, share knowledge, and help make our project better for everyone. By following this Code of Conduct, we can create a community that supports innovation, collaboration, and the open-source values we all believe in.
+
+Thank you for being part of the Microcks community!
diff --git a/jdk_21_maven/cs/rest-gui/microcks/CONTRIBUTING.md b/jdk_21_maven/cs/rest-gui/microcks/CONTRIBUTING.md
new file mode 100644
index 000000000..500bfc70b
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/CONTRIBUTING.md
@@ -0,0 +1,85 @@
+# Contributing to Microcks
+
+We love your input! We want to make contributing to this project as easy and transparent as possible.
+
+## Contribution recogniton
+
+We plan to use [All Contributors](https://allcontributors.org/docs/en/specification) specification to handle recognitions.
+
+## Summary of the contribution flow
+
+The following is a summary of the ideal contribution flow. Please, note that Pull Requests can also be rejected by the maintainers when appropriate.
+
+```
+ ┌───────────────────────┐
+ │ │
+ │ Open an issue │
+ │ (a bug report or a │
+ │ feature request) │
+ │ │
+ └───────────────────────┘
+ ⇩
+ ┌───────────────────────┐
+ │ │
+ │ Open a Pull Request │
+ │ (only after issue │
+ │ is approved) │
+ │ │
+ └───────────────────────┘
+ ⇩
+ ┌───────────────────────┐
+ │ │
+ │ Your changes will │
+ │ be merged and │
+ │ published on the next │
+ │ release │
+ │ │
+ └───────────────────────┘
+```
+
+## Code of Conduct
+
+Microcks has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](CODE_OF_CONDUCT.md) so that you can understand what sort of behaviour is expected.
+
+## Our Development Process
+
+We use Github to host code, to track issues and feature requests, as well as accept pull requests.
+
+## Issues
+
+[Open an issue](https://github.com/microcks/microcks/issues/new) **only** if you want to report a bug or a feature. Don't open issues for questions or support, instead join our [Discord #support channel](https://microcks.io/discord-invite) or our [GitHub discussions](https://github.com/orgs/microcks/discussions) and ask there.
+
+## Bug Reports and Feature Requests
+
+Please use our issues templates that provide you with hints on what information we need from you to help you out.
+
+## Pull Requests
+
+**Please, make sure you open an issue before starting with a Pull Request, unless it's a typo or a really obvious error.** Pull requests are the best way to propose changes to the specification. Take time to check the current working branch for the repository you want to contribute on before working :wink:
+
+## Conventional commits
+
+Our repositories follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) specification. Releasing to GitHub and NPM is done with the support of [semantic-release](https://semantic-release.gitbook.io/semantic-release/).
+
+Pull requests should have a title that follows the specification, otherwise, merging is blocked. If you are not familiar with the specification simply ask maintainers to modify. You can also use this cheatsheet if you want:
+
+- `fix: ` prefix in the title indicates that PR is a bug fix and PATCH release must be triggered.
+- `feat: ` prefix in the title indicates that PR is a feature and MINOR release must be triggered.
+- `docs: ` prefix in the title indicates that PR is only related to the documentation and there is no need to trigger release.
+- `chore: ` prefix in the title indicates that PR is only related to cleanup in the project and there is no need to trigger release.
+- `test: ` prefix in the title indicates that PR is only related to tests and there is no need to trigger release.
+- `refactor: ` prefix in the title indicates that PR is only related to refactoring and there is no need to trigger release.
+
+What about MAJOR release? just add `!` to the prefix, like `fix!: ` or `refactor!: `
+
+Prefix that follows specification is not enough though. Remember that the title must be clear and descriptive with usage of [imperative mood](https://chris.beams.io/posts/git-commit/#imperative).
+
+Happy contributing :heart:
+
+## License
+
+When you submit changes, your submissions are understood to be under the same [Apache 2.0 License](https://github.com/microcks/microcks/blob/master/LICENSE) that covers the project. Feel free to [contact the maintainers](https://github.com/microcks/.github/blob/main/MAINTAINERS.md) if that's a concern.
+
+## References
+
+This document was adapted from the open-source contribution guidelines for [Facebook's Draft](https://github.com/facebook/draft-js/blob/master/CONTRIBUTING.md).
diff --git a/jdk_21_maven/cs/rest-gui/microcks/DEPENDENCY_POLICY.md b/jdk_21_maven/cs/rest-gui/microcks/DEPENDENCY_POLICY.md
new file mode 100644
index 000000000..10c51d6bf
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/DEPENDENCY_POLICY.md
@@ -0,0 +1,64 @@
+# Microcks External Dependency Policy
+
+## External dependencies dashboard
+
+The list of external dependencies in this Microcks repository with their current version is available at
+[network/dependencies](../../network/dependencies)
+
+## Declaring external dependencies
+
+Depending on the Microcks Core or Module/extension technology stack, all external dependencies should be declared
+in either [pom.xml](pom.xml), [package.json](package.json) or [go.mod](go.mod) root files.
+
+Dependency declarations must:
+
+* Provide a meaningful project name and URL.
+* State the version in the `version` field. String interpolation can be used to aggregate all versions declaration at the same place.
+* Versions should prefer release versions over main branch GitHub SHA tarballs. A comment is necessary if the latter is used.
+ This comment should contain the reason that a non-release version is being used.
+
+## New external dependencies
+
+The criteria below are used to evaluate new dependencies. They apply to all core dependencies and any extension
+that is robust to untrusted downstream or upstream traffic. The criteria are guidelines, exceptions may be granted
+with solid rationale. Precedent from existing extensions does not apply; there are extant extensions in violation
+of this policy which we will be addressing over time, they do not provide grounds to ignore policy criteria below.
+
+|Criteria|Requirement|Mnemonic|Weight|Rationale|
+|--------|-----------|--------|------|---------|
+|Cloud Native Computing Foundation (CNCF) [approved license](https://github.com/cncf/foundation/blob/master/allowed-third-party-license-policy.md#approved-licenses-for-allowlist)|MUST|License|High||
+|Dependencies must not substantially increase the binary size unless they are optional (i.e. confined to specific extensions)|MUST|BinarySize|High|Microcks Uber is sensitive to binary size. We should pick dependencies that are used in core with this criteria in mind.|
+|No duplication of existing dependencies|MUST|NoDuplication|High|Avoid maintenance cost of multiple utility libs with same goals (ex: JSON parsers)|
+|CVE history appears reasonable, no pathological CVE arcs|MUST|SoundCVEs|High|Avoid dependencies that are CVE heavy in the same area (e.g. buffer overflow)
+|Security vulnerability process exists, with contact details and reporting/disclosure process|MUST|SecPolicy|High|Lack of a policy implies security bugs are open zero days|
+|Code review (ideally PRs) before merge|MUST|Code-Review|Normal|Consistent code reviews|
+|> 1 contributor responsible for a non-trivial number of commits|MUST|Contributors|Normal|Avoid bus factor of 1|
+|Tests run in CI|MUST|CI-Tests|Normal|Changes gated on tests|
+|Hosted on a git repository and the archive fetch must directly reference this repository. We will NOT support intermediate artifacts built by-hand located on GCS, S3, etc.|MUST|Source|Normal|Flows based on manual updates are fragile (they are not tested until needed), often suffer from missing documentation and shared exercise, may fail during emergency zero day updates and have no audit trail (i.e. it's unclear how the artifact we depend upon came to be at a later date).|
+|High test coverage (also static/dynamic analysis, fuzzing)|SHOULD|Test-Coverage|Normal|Key dependencies must meet the same quality bar as Envoy|
+|Do other significant projects have shared fate by using this dependency?|SHOULD|SharedFate|High|Increased likelihood of security community interest, many eyes.|
+|Releases (with release notes)|SHOULD|Releases|Normal|Discrete upgrade points, clear understanding of security implications. We have many counterexamples today (e.g. CEL, re2).|
+|Commits/releases in last 90 days|SHOULD|Active|Normal|Avoid unmaintained deps, not compulsory since some code bases are “done”|
+
+
+## Maintaining existing dependencies
+
+We rely on community volunteers to help track the latest versions of dependencies. On a best effort
+basis:
+
+* Core Microcks dependencies will be updated by the Microcks maintainers/security team.
+
+* Module/extension [CODEOWNERS](./CODEOWNERS) should update extension specific dependencies.
+
+Where possible, we prefer the latest release version for external dependencies, rather than main branch GitHub SHA tarballs.
+
+If you intend to update a dependency, please assign the relevant ticket to yourself and/or associate any Pull Request (eg by adding `chore: #1234`) with the issue.
+
+
+## Policy exceptions
+
+The following dependencies are exempt from the policy:
+
+* Any developer-only facing tooling or the documentation build.
+
+* Transitive build time dependencies.
\ No newline at end of file
diff --git a/jdk_21_maven/cs/rest-gui/microcks/GOVERNANCE.md b/jdk_21_maven/cs/rest-gui/microcks/GOVERNANCE.md
new file mode 100644
index 000000000..f288a49ca
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/GOVERNANCE.md
@@ -0,0 +1,91 @@
+# Microcks Governance
+
+This document defines governance policies for the Microcks project.
+
+## Principles
+The Microcks project community adheres to the following principles:
+
+- **Open**: The Microcks community strives to be open, accessible and welcoming to everyone. Anyone may contribute, and contributions are available to all users according to open source values and licenses.
+- **Transparent** and **accessible**: Any changes to the Microcks source code and collaborations on the project are publicly accessible (GitHub code, issues, PRs, and discussions).
+- **Merit**: Ideas and contributions are accepted according to their technical merit and alignment with project objectives, scope, and design principles.
+- **Vendor-neutral**: Microcks is designed and maintained to be fully aligned with the [principles](https://contribute.cncf.io/maintainers/community/vendor-neutrality/) of the Cloud Native Computing Foundation (CNCF).
+
+Join us 👉 https://microcks.io/community/
+
+## Maintainers, Code Owners, Contributors and Adopters
+The Microcks project has four roles. All project members operate in one (or more) of these roles:
+
+| Level | Role | Responsibilities |
+| :--- | :--- | :--- |
+| 1 | **Maintainer** | Vote, Develop roadmap and contribution guidelines; Review, Approve/Reject, Merge, and Manage repositories. Maintainers are elected or removed by the current maintainers. A Maintainer has authority over the entire Microcks project: the organization and every project, sub-project and repo within the organization.|
+| 2 | **Code Owner**| Have special expertise in a particular domain within the Microcks project. The domain may be a sub-project, repo or other responsibility as defined by the Maintainers. The maintainers grant a code owner (alias Domain Maintainers) a set of authorities and responsibilities for the domain. Code owners are expected to join maintainer and community meetings when required. A code owner has no responsibilities for the entire project, organization or projects outside their domain. Code owners role, refer to [GitHub CODEOWNERS](https://docs.github.com/fr/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners) capabilities.|
+| 3 | **Contributor** | Contribute code, test and document the project. A contributor’s authority applies to one or more sub-projects. Microcks is a very welcoming community and is eager to onboard and help anyone from the open source community to contribute to the project. |
+| 4 | **Adopter** | Use the Microcks project, with or without contributing to the project. Adopters are encouraged to raise issues, provide feedback and participate in discussions on sub-projects within a public forum and community. |
+
+- Maintainer and Code Owners list: https://github.com/microcks/.github/blob/main/MAINTAINERS.md
+- Contributors list: (DevStats) [new contributors over the last 6 months](https://microcks.devstats.cncf.io/d/52/new-contributors-table?orgId=1&from=now-6M&to=now) / (GitHub) [contributors on Microcks main repo](https://github.com/microcks/microcks/graphs/contributors).
+- Adopters (public) list: https://github.com/microcks/.github/blob/main/ADOPTERS.md
+> 📢 If you're using Microcks in your organization, please add your company name to this [list](https://github.com/microcks/.github/blob/main/ADOPTERS.md) 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a significant impact.
+
+## Contributor ladder
+To become a maintainer, you need to get involved with the Microcks project on GitHub and demonstrate commitment and qualities:
+
+ * Participation: For three months or more. Examples include participation in discussions, contributions and code or documentation reviews.
+ * Collaboration: Demonstrate the ability to work with others, take on new ideas and help others succeed.
+ * Availability (ideally full-time): Be available on Slack, Discord, GitHub, and email so you can help move the project forward in a timely way.
+ * Respect: Alignment with Microcks and CNCF code of conduct and guiding principles.
+
+### Voting in and voting out maintainers
+
+1. Maintainers make a public announcement during community meetings,
+2. During this meeting, a maintainer nominates to add a new maintainer or remove an existing maintainer,
+3. The nominator will open a PR to the [centralized](https://github.com/microcks/.github/blob/main/MAINTAINERS.md) Maintainer and Code Owners list,
+4. Maintainers vote via GitHub PR comments, with a 2 week deadline. Anyone in the community is welcome to comment. Community comments will be considered but not counted toward the vote,
+5. After two weeks, any maintainer who abstains from voting will not be counted towards the vote,
+6. Decision is approved with a super-majority: 66% 2/3) or more of maintainers who have voted within two weeks,
+7. If 66% (2/3) of all maintainers have approved within two weeks, the voting is closed early.
+
+For maintainers voted in, permissions are immediately added. For maintainers, voted-out permissions are immediately removed.
+
+### Becoming a Code Owner
+A Code Owner (alias Domain Maintainers) is appointed by the maintainers to recognize a contributor with expertise and authority in a specific domain. Code Owners are appointed to have elevated privileges, authority and specific responsibilities. The code owner role is part of the Microcks contributor ladder and is the primary path from contributor to maintainer. The roles and responsibilities of code owners are scoped. A person can have one or more code owner responsibilities.
+
+Code owners are enabled to act independently. They do not have responsibilities or voting rights over the entire project or organization. They are expected to participate with the community, but they are not expected to participate in maintainer meetings unless requested.
+
+### Remaining a Maintainer or Code Owner
+
+If a maintainer or code owner can no longer fulfill their commitments, they should consult with the maintainers and either take a sabbatical or step down from their role. All maintainers share the responsibility of ensuring the group operates with consistent dedication. If a maintainer or code owner fails to meet their commitments, they may be voted out by the maintainers and transitioned to emeritus status.
+
+## Adding or Removing Sub Projects
+Microcks maintainers have the authority to add or remove sub-projects or repositories as needed. We follow a careful approach when making these changes: any new sub-project must serve a long-term purpose that is clearly distinct from existing ones, while sub-projects slated for removal must be shown to have either outlived their usefulness, become deprecated or unmaintainable.
+
+When a sub-project is removed, it will be archived as-is within the Microcks-archive organization, along with its associated repositories, ensuring transparency and historical reference.
+
+## Conflict Resolutions
+Typically, it is assumed that disputes will be resolved amicably by those involved. However, if the situation becomes more serious, conflicts will be resolved through a voting process. A supermajority of votes from project maintainers is required to make a decision, and the project lead has the final say in the ruling.
+
+## Community Meetings
+[Microcks](https://microcks.io/) hosts two monthly community meetings tailored for different time zones:
+
+- **APAC-friendly Meeting:** Second Thursday of each month
+ - Time: 9–10 a.m. CET / 1–2 p.m. Bengaluru
+- **America-friendly Meeting:** Fourth Thursday of each month
+ - Time: 6–7 p.m. CET / 1–2 p.m. EST / 9–10 a.m. PST
+
+Here’s how to join and participate: https://github.com/microcks/community/blob/main/JOIN-OUR-MEETINGS.md
+
+The maintainers will also have closed meetings to discuss security reports or Code of Conduct violations. Any maintainer in charge should schedule such meetings upon receiving a security issue or CoC report. All current Maintainers must be invited to such closed meetings, except for any maintainer accused of a CoC violation.
+
+## Governance Changes
+Changes to governance policy and any supporting documents must be agreed upon and approved by 66% (2/3) of the maintainers either by vote or by review and approval of a PR on the document.
+
+This Project Governance is a living document. As the Microcks community and project continue to evolve, maintainers are **committed** to improving and openly sharing our governance model, ensuring transparency and collaboration every step of the way.
+
+## Code of Conduct
+Microcks follow the [Code of Conduct](CODE_OF_CONDUCT.md), which is aligned with the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
+
+## Credits
+Thanks to [Dawn Foster](https://github.com/geekygirldawn) for the inspiring talk and valuable insights at KubeCon Europe 2022: "Good Governance Practices for CNCF Projects":
+[Info](https://contribute.cncf.io/resources/videos/2022/good-governance-practices/), [Recording](https://youtu.be/x0tgEpIER1M?si=0EMgdfA1j5kxpXlW) and [slide deck](https://static.sched.com/hosted_files/kccnceu2022/7c/Good_Governance_CNCF_Projects.pdf) 👀
+
+Sections of this document have been borrowed and inspired from the [CoreDNS](https://github.com/coredns/coredns/blob/master/GOVERNANCE.md), [Kyverno](https://github.com/kyverno/kyverno/blob/main/GOVERNANCE.md), [OpenEBS](https://github.com/openebs/community/blob/72506ee3b885bd06324b82a650fcd3a61e93eef0/GOVERNANCE.md) and [fluxcd](https://github.com/fluxcd/community/blob/main/GOVERNANCE.md) projects.
diff --git a/jdk_21_maven/cs/rest-gui/microcks/LICENSE b/jdk_21_maven/cs/rest-gui/microcks/LICENSE
new file mode 100644
index 000000000..e06d20818
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/LICENSE
@@ -0,0 +1,202 @@
+Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/jdk_21_maven/cs/rest-gui/microcks/MAINTAINERS.md b/jdk_21_maven/cs/rest-gui/microcks/MAINTAINERS.md
new file mode 100644
index 000000000..40fecf3a4
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/MAINTAINERS.md
@@ -0,0 +1,34 @@
+> [!Important]
+> Microcks governance, roles and policies are defined in the [GOVERNANCE](https://github.com/microcks/.github/blob/main/GOVERNANCE.md) file.
+> This MAINTAINERS file applies to every sub-project, repository and file existing within the [Microcks GitHub organization](https://github.com/microcks/).
+> Please keep the lists sorted in ascending alphabetical order.
+
+## Overview
+
+This document provides an alphabetical list of Microcks' maintainers and code owners. If you want to contribute and become a maintainer or code owner, please refer to [CONTRIBUTING](CONTRIBUTING.md).
+
+## Maintainers
+
+The following members are Top-level [maintainers](https://github.com/microcks/.github/blob/main/GOVERNANCE.md#maintainers-code-owners-contributors-and-adopters) of the Microcks Parent Org, Parent Project, all repos, sub-repos, projects, sub-projects and forks contained within and under the entire Microcks parent org; with Full Binding Vote status.
+
+| Name | GitHub ID | Affiliation |
+|----------------------------------------------------------|--------------------------------------------------------------|-------------------|
+| Laurent Broudoux | [lbroudoux](https://github.com/lbroudoux) | Sponsored by Postman |
+| Yacine Kheddache | [yada](https://github.com/yada) | Sponsored by Postman |
+
+## Code Owners
+
+The following members are [code owners](https://github.com/microcks/.github/blob/main/GOVERNANCE.md#maintainers-code-owners-contributors-and-adopters) with specialized expertise in specific domains within the Microcks project. The domain may be a sub-project, repo or other responsibility as defined by the Maintainers.
+
+| Name | GitHub ID | Affiliation | Sub-Projects |
+|----------------------------------------------------------|-------------------------------------------------------------|-------------------|-------------------|
+| Hugo Guerrero | [hguerrero](https://github.com/hguerrero) | Kong (Ex Red Hat) | [Docker Desktop Extension](https://github.com/microcks/microcks-docker-desktop-extension) |
+| Julien Breux | [JulienBreux](https://github.com/JulienBreux) | Google | [Microcks CLI](https://github.com/microcks/microcks-cli), [Microcks Go Client](https://github.com/microcks/microcks-go-client) |
+| Sebastien DEGODEZ | [SebastienDegodez](https://github.com/SebastienDegodez) | AXA France | [Testcontainers .NET](https://github.com/microcks/microcks-testcontainers-dotnet) |
+
+## Emeritus
+
+Below the list of Emeritus members are those who are no longer active but are recognized for their past contributions to the project.
+
+| Name | GitHub ID | Affiliation | Sub-Projects |
+|----------------------------------------------------------|-------------------------------------------------------------|-------------------|-------------------|
diff --git a/jdk_21_maven/cs/rest-gui/microcks/README.md b/jdk_21_maven/cs/rest-gui/microcks/README.md
new file mode 100644
index 000000000..7d6e57d71
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/README.md
@@ -0,0 +1,76 @@
+
+
+[](https://github.com/microcks/microcks/actions)
+[](https://quay.io/repository/microcks/microcks?tab=tags)
+[]((https://search.maven.org/artifact/io.github.microcks/microcks))
+[](https://www.apache.org/licenses/LICENSE-2.0)
+[](https://microcks.io/discord-invite/)
+[](https://artifacthub.io/packages/search?repo=microcks)
+[](https://landscape.cncf.io/?item=app-definition-and-development--application-definition-image-build--microcks)
+
+# Microcks - Kubernetes native tool for API Mocking & Testing
+
+Microcks is a platform for turning your API and microservices assets - *OpenAPI specs*, *AsyncAPI specs*, *gRPC protobuf*, *GraphQL schema*, *Postman collections*, *SoapUI projects* - into live mocks in seconds.
+
+It also reuses these assets to run compliance and non-regression tests against your API implementation. We provide integrations with *Jenkins*, *GitHub Actions*, *Tekton* and many others through a simple CLI.
+
+[](https://insights.linuxfoundation.org/project/microcks/repository/microcks-microcks) [](https://insights.linuxfoundation.org/project/microcks/repository/microcks-microcks) [&message=208&color=0094FF&logo=linuxfoundation&logoColor=white&style=flat)](https://insights.linuxfoundation.org/project/microcks/repository/microcks-microcks)
+
+## Getting Started
+
+* [Documentation](https://microcks.io/documentation/tutorials/getting-started/)
+* [Microcks Community](https://github.com/microcks/community) and community meeting
+
+To get involved with our community, please familiarize yourself with the project's [Code of Conduct](./CODE_OF_CONDUCT.md).
+
+## Build Status
+
+The current development version is `1.12.2-SNAPSHOT` on branch `1.12.x`.
+
+[](https://github.com/microcks/microcks/actions)
+
+#### Sonarcloud Quality metrics
+
+[](https://sonarcloud.io/summary/new_code?id=microcks_microcks)
+[](https://sonarcloud.io/summary/new_code?id=microcks_microcks)
+[](https://sonarcloud.io/summary/new_code?id=microcks_microcks)
+[](https://sonarcloud.io/summary/new_code?id=microcks_microcks)
+[](https://sonarcloud.io/summary/new_code?id=microcks_microcks)
+[](https://sonarcloud.io/summary/new_code?id=microcks_microcks)
+[](https://sonarcloud.io/summary/new_code?id=microcks_microcks)
+
+#### Fossa license and security scans
+
+[](https://app.fossa.com/projects/git%2Bgithub.com%2Fmicrocks%2Fmicrocks?ref=badge_shield&issueType=license)
+[](https://app.fossa.com/projects/git%2Bgithub.com%2Fmicrocks%2Fmicrocks?ref=badge_shield&issueType=security)
+[](https://app.fossa.com/projects/git%2Bgithub.com%2Fmicrocks%2Fmicrocks?ref=badge_small)
+
+#### Signature, Provenance, SBOM
+
+[](https://microcks.io/documentation/references/container-images#software-supply-chain-security)
+
+#### OpenSSF best practices
+
+[](https://bestpractices.coreinfrastructure.org/projects/7513)
+[](https://securityscorecards.dev/viewer/?uri=github.com/microcks/microcks)
+
+
+## Versions
+
+Here are the naming conventions we're using for current releases, ongoing development maintenance activities.
+
+| Status | Version | Branch | Container images tags |
+| ----------- |-------------------|----------|-----------------------|
+| Stable | `1.12.1` | `master` | `1.12.1`, `latest` |
+| Dev | `1.12.2-SNAPSHOT` | `1.12.x` | `nightly` |
+| Maintenance | `1.11.3-SNAPSHOT` | `1.11.x` | `maintenance` |
+
+
+## How to build Microcks
+
+The build instructions are available in the [building guide](BUILDING.md).
+
+## Thanks to the community!
+
+[](http://github.com/microcks/microcks/stargazers)
+[](http://github.com/microcks/microcks/network/members)
diff --git a/jdk_21_maven/cs/rest-gui/microcks/ROADMAP.md b/jdk_21_maven/cs/rest-gui/microcks/ROADMAP.md
new file mode 100644
index 000000000..85f6ab5d9
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/ROADMAP.md
@@ -0,0 +1,8 @@
+# Microcks Feature Planning and Tracking (roadmap) 🗓️
+
+Microcks features are planned and tracked through the Project Tracker board on GitHub.
+
+👉 You can view the roadmap by [area](https://github.com/orgs/microcks/projects/1/views/1) or by [status](https://github.com/orgs/microcks/projects/1/views/2).
+
+The full release roadmaps of the main repo are managed via [release milestones](https://github.com/microcks/microcks/milestones?direction=asc&sort=due_date&state=open) on GitHub.
+
diff --git a/jdk_21_maven/cs/rest-gui/microcks/SECURITY-INSIGHTS.yml b/jdk_21_maven/cs/rest-gui/microcks/SECURITY-INSIGHTS.yml
new file mode 100644
index 000000000..07414468a
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/SECURITY-INSIGHTS.yml
@@ -0,0 +1,56 @@
+header:
+ schema-version: 1.0.0
+ last-updated: '2024-09-30'
+ last-reviewed: '2024-09-30'
+ expiration-date: '2025-09-30T01:00:00.000Z'
+ project-url: https://github.com/microcks/microcks
+ project-release: '1.10.1'
+ changelog: https://github.com/microcks/microcks/blob/main/CHANGELOG.md
+ license: https://github.com/microcks/microcks/blob/main/LICENSE
+project-lifecycle:
+ status: active
+ roadmap: https://github.com/microcks/microcks/blob/main/ROADMAP.md
+ bug-fixes-only: false
+ core-maintainers:
+ - github:lbroudoux
+ - github:yada
+contribution-policy:
+ accepts-pull-requests: true
+ accepts-automated-pull-requests: true
+ code-of-conduct: https://github.com/microcks/.github/blob/master/CODE_OF_CONDUCT.md
+ contributing-policy: https://github.com/microcks/.github/blob/master/CONTRIBUTING.md
+documentation:
+ - https://microcks.io
+distribution-points:
+ - https://microcks.io
+ - https://github.com/microcks/microcks
+ - https://quay.io/microcks
+security-artifacts:
+ threat-model:
+ threat-model-created: false
+security-testing:
+ - tool-type: sca
+ tool-name: Dependabot
+ tool-version: latest
+ integration:
+ ad-hoc: true
+ ci: false
+ before-release: false
+ comment: |
+ Dependabot is enabled for this repo on a weekly scheduled basis.
+security-contacts:
+ - type: email
+ value: security@microcks.io
+vulnerability-reporting:
+ accepts-vulnerability-reports: true
+ security-policy: https://github.com/microcks/microcks/security/policy
+ email-contact: security@microcks.io
+ comment: |
+ To report a security issue for one of the libraries owned by the Microcks community, write an email with a detailed description of the issue to security@microcks.io.
+dependencies:
+ third-party-packages: true
+ dependencies-lists:
+ - https://github.com/microcks/microcks/network/dependencies
+ - https://app.fossa.com/projects/git%2Bgithub.com%2Fmicrocks%2Fmicrocks/refs/branch/master/4eca8d6eccc7456c079e1e0e374d7ff783e32ce2/browse/dependencies
+ env-dependencies-policy:
+ policy-url: https://github.com/microcks/microcks/blob/main/DEPENDENCY_POLICY.md
\ No newline at end of file
diff --git a/jdk_21_maven/cs/rest-gui/microcks/SECURITY.md b/jdk_21_maven/cs/rest-gui/microcks/SECURITY.md
new file mode 100644
index 000000000..b4f8b9dd7
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/SECURITY.md
@@ -0,0 +1,23 @@
+# Security Policy
+
+## Reporting a Vulnerability
+
+If you've found a vulnerability in our components or website or want additional information regarding how we manage security, please report it via a [GitHub discussion](https://github.com/microcks/microcks/discussions).
+
+If you do not want to publicly report a security issue for one of the libraries owned by the Microcks community, write an email with a detailed description of the issue to security@microcks.io.
+
+## Public Disclosure Timing
+
+We prefer to fully disclose the bug as soon as possible once a user mitigation is available. The Fix Lead drives the schedule using their best judgment based on severity, development time, and release manager feedback. If the Fix Lead deals with public disclosure, all timelines will be set as soon as possible (ASAP).
+
+## Supported Versions
+
+Microcks releases follow the [semver](https://semver.org/) specification. Security fixes are typically merged into the current development branch and are due for release in the next minor version. We may create a fix release upon request or, if deemed necessary, as part of a critical security fix.
+
+## Security Team
+
+The security team is made up of a subset of the project [maintainers](https://github.com/microcks/.github/blob/main/GOVERNANCE.md#maintainers-code-owners-contributors-and-adopters) and [code owners](https://github.com/microcks/.github/blob/main/GOVERNANCE.md#maintainers-code-owners-contributors-and-adopters) who are willing and able to respond to vulnerability reports.
+
+## Credits
+
+Sections of this document have been borrowed and inspired from the [OpenEBS](https://github.com/openebs/community/blob/72506ee3b885bd06324b82a650fcd3a61e93eef0/SECURITY.md) project.
diff --git a/jdk_21_maven/cs/rest-gui/microcks/api/APIExamples-v1alpha1-schema.json b/jdk_21_maven/cs/rest-gui/microcks/api/APIExamples-v1alpha1-schema.json
new file mode 100644
index 000000000..4f795668d
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/api/APIExamples-v1alpha1-schema.json
@@ -0,0 +1,228 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://microcks.io/schemas/APIExamples-v1alpha1-schema.json",
+ "title": "The APIExamples JSON schema",
+ "description": "APIExamples is a specification for defining examples of API.",
+ "required": [
+ "apiVersion",
+ "kind",
+ "metadata",
+ "operations"
+ ],
+ "properties": {
+ "apiVersion": {
+ "$id": "#/properties/apiVersion",
+ "type": "string",
+ "title": "The apiVersion of APIExamples",
+ "description": "The version of APIExamples description.",
+ "const": "mocks.microcks.io/v1alpha1"
+ },
+ "kind": {
+ "$id": "#/properties/kind",
+ "type": "string",
+ "title": "The APIExamples kind schema",
+ "description": "Kind marker for APIExamples",
+ "const": "APIExamples"
+ },
+ "metadata": {
+ "$id": "#/properties/metadata",
+ "type": "object",
+ "title": "The metadata of APIExamples",
+ "description": "Holds reference information about this Service/API examples relate.",
+ "required": [
+ "name",
+ "version"
+ ],
+ "properties": {
+ "name": {
+ "$id": "#/properties/metadata/properties/name",
+ "type": "string",
+ "title": "The name of API these examples relate to.",
+ "description": "Human readable name of the target API for examples."
+ },
+ "version": {
+ "$id": "#/properties/metadata/properties/version",
+ "type": "string",
+ "title": "The version of API these examples relate to.",
+ "description": "Human readable version of the target API for examples."
+ }
+ }
+ },
+ "operations": {
+ "$id": "#/properties/operations",
+ "type": "object",
+ "title": "The API operations",
+ "description": "The examples are organized using API operations.",
+ "patternProperties": {
+ "^.": {
+ "$ref": "#/definitions/operationItem"
+ }
+ }
+ }
+ },
+ "definitions": {
+ "operationItem": {
+ "$id": "#/definitions/operationItem",
+ "type": "object",
+ "title": "One API operation examples",
+ "description": "Examples of an API operation.",
+ "patternProperties": {
+ "^.": {
+ "$ref": "#/definitions/exampleItem"
+ }
+ }
+ },
+ "exampleItem": {
+ "$id": "#/definitions/operationItem",
+ "title": "One API example item",
+ "description": "One example item of an API operation.",
+ "oneOf": [
+ {
+ "$ref": "#/definitions/requestResponsePair"
+ },
+ {
+ "$ref": "#/definitions/unidirectionalMessage"
+ }
+ ]
+ },
+ "requestResponsePair": {
+ "$id": "#/definitions/requestResponsePair",
+ "type": "object",
+ "title": "Request/Response example",
+ "description": "A request/response pair example for an API operation.",
+ "required": [
+ "request",
+ "response"
+ ],
+ "properties": {
+ "request": {
+ "$ref": "#/definitions/request"
+ },
+ "response": {
+ "$ref": "#/definitions/response"
+ }
+ },
+ "additionalProperties": false
+ },
+ "unidirectionalMessage": {
+ "$id": "#/definitions/unidirectionalMessage",
+ "type": "object",
+ "title": "Unidirectional message example",
+ "description": "A unidirectional message example for an API operation.",
+ "required": [
+ "eventMessage"
+ ],
+ "properties": {
+ "eventMessage": {
+ "$ref": "#/definitions/eventMessage"
+ }
+ },
+ "additionalProperties": false
+ },
+ "request": {
+ "$id": "#/definitions/request",
+ "type": "object",
+ "title": "The request of a request/response pair",
+ "description": "The request part of a request/response pair.",
+ "properties": {
+ "parameters": {
+ "type": "object",
+ "title": "The request parameters",
+ "description": "The parameters (query or path located) of the request.",
+ "additionalProperties": true
+ },
+ "headers": {
+ "type": "object",
+ "title": "The request headers",
+ "description": "The headers of the request.",
+ "additionalProperties": true
+ },
+ "body": {
+ "title": "The request body",
+ "description": "The body of the request.",
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "object"
+ },
+ {
+ "type": "array"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false
+ },
+ "response": {
+ "$id": "#/definitions/response",
+ "type": "object",
+ "title": "The response of a request/response pair",
+ "description": "The response part of a request/response pair.",
+ "properties": {
+ "headers": {
+ "type": "object",
+ "title": "The response headers",
+ "additionalProperties": true
+ },
+ "mediaType": {
+ "type": "string",
+ "title": "The response media type",
+ "description": "The media type of the response body (like application/json)."
+ },
+ "status": {
+ "type": "string",
+ "title": "The response status",
+ "description": "The status of the response (typically the Http code)."
+ },
+ "body": {
+ "title": "The response body",
+ "description": "The body of the response.",
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "object"
+ },
+ {
+ "type": "array"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false
+ },
+ "eventMessage": {
+ "$id": "#/definitions/eventMessage",
+ "type": "object",
+ "title": "The event message",
+ "description": "The event message of a unidirectional message example.",
+ "properties": {
+ "headers": {
+ "type": "object",
+ "title": "The event message headers",
+ "description": "The headers of the event message.",
+ "additionalProperties": true
+ },
+ "payload": {
+ "title": "The event message payload",
+ "description": "The payload of the event message.",
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "object"
+ },
+ {
+ "type": "array"
+ }
+ ]
+ }
+ },
+ "additionalProperties": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/jdk_21_maven/cs/rest-gui/microcks/api/APIMetadata-v1alpha1-schema.json b/jdk_21_maven/cs/rest-gui/microcks/api/APIMetadata-v1alpha1-schema.json
new file mode 100644
index 000000000..3b2edca2f
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/api/APIMetadata-v1alpha1-schema.json
@@ -0,0 +1,158 @@
+{
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$id": "https://microcks.io/schemas/APIMetadata-v1alpha1-schema.json",
+ "title": "The APIMetadata JSON schema",
+ "description": "APIMetadata is a specification for customizing metadata of API.",
+ "required": [
+ "apiVersion",
+ "kind",
+ "metadata",
+ "operations"
+ ],
+ "properties": {
+ "apiVersion": {
+ "$id": "#/properties/apiVersion",
+ "type": "string",
+ "title": "The apiVersion of APIExamples",
+ "description": "The version of APIExamples description.",
+ "const": "mocks.microcks.io/v1alpha1"
+ },
+ "kind": {
+ "$id": "#/properties/kind",
+ "type": "string",
+ "title": "The APIMetadata kind schema",
+ "description": "Kind marker for APIMetadata",
+ "const": "APIMetadata"
+ },
+ "metadata": {
+ "$id": "#/properties/metadata",
+ "type": "object",
+ "title": "The metadata of APIMetadata",
+ "description": "Holds reference information about this Service/API metadata relate.",
+ "required": [
+ "name",
+ "version"
+ ],
+ "properties": {
+ "name": {
+ "$id": "#/properties/metadata/properties/name",
+ "type": "string",
+ "title": "The name of API these metadata relate to.",
+ "description": "Human readable name of the target API for metadata."
+ },
+ "version": {
+ "$id": "#/properties/metadata/properties/version",
+ "type": "string",
+ "title": "The version of API these metadata relate to.",
+ "description": "Human readable version of the target API for examples."
+ },
+ "labels": {
+ "$id": "#/properties/metadata/properties/labels",
+ "type": "object",
+ "title": "The metadata labels for API",
+ "description": "The metadata labels to apply on the API.",
+ "additionalProperties": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "operations": {
+ "$id": "#/properties/operations",
+ "type": "object",
+ "title": "The API operations",
+ "description": "The metadata are organized using API operations.",
+ "patternProperties": {
+ "^.": {
+ "$ref": "#/definitions/operationItem"
+ }
+ }
+ }
+ },
+ "definitions": {
+ "operationItem": {
+ "$id": "#/definitions/operationItem",
+ "type": "object",
+ "title": "One API operation metadata",
+ "description": "Metadata for an API operation.",
+ "properties": {
+ "delay": {
+ "$id": "#/definitions/operationItem/properties/delay",
+ "type": "integer",
+ "title": "The delay of the operation",
+ "description": "The response delay of the operation in milliseconds."
+ },
+ "frequency": {
+ "$id": "#/definitions/operationItem/properties/frequency",
+ "type": "integer",
+ "title": "The frequency of the operation",
+ "description": "The publication frequency of the operation in seconds."
+ },
+ "dispatcher": {
+ "$id": "#/definitions/operationItem/properties/dispatcher",
+ "type": "string",
+ "title": "The dispatcher of the operation",
+ "description": "The dispatcher strategy to use for the operation."
+ },
+ "dispatcherRules": {
+ "$id": "#/definitions/operationItem/properties/dispatcherRules",
+ "type": "string",
+ "title": "The dispatcherRules of the operation",
+ "description": "The dispatcher rules to use to configure the dispatcher."
+ },
+ "parameterConstraints": {
+ "$id": "#/definitions/operationItem/properties/parameterConstraints",
+ "type": "array",
+ "title": "The parameterConstraints of the operation",
+ "description": "The constraints to apply on operation parameters.",
+ "items": {
+ "$ref": "#/definitions/parameterConstraint"
+ }
+ }
+ }
+ },
+ "parameterConstraint": {
+ "$id": "#/definitions/parameterConstraint",
+ "type": "object",
+ "title": "A parameter constraint",
+ "description": "A constraint to apply on an operation parameter.",
+ "properties": {
+ "name": {
+ "$id": "#/definitions/parameterConstraint/properties/name",
+ "type": "string",
+ "title": "The name of the parameter",
+ "description": "The name of the parameter constraint applies to."
+ },
+ "in": {
+ "$id": "#/definitions/parameterConstraint/properties/in",
+ "type": "string",
+ "enum": [
+ "path",
+ "query",
+ "header"
+ ],
+ "title": "The location of the parameter",
+ "description": "Whether the parameter is in path, query, header or body."
+ },
+ "required": {
+ "$id": "#/definitions/parameterConstraint/properties/required",
+ "type": "boolean",
+ "title": "Is this parameter required?",
+ "description": "Whether the parameter is required or not."
+ },
+ "recopy": {
+ "$id": "#/definitions/parameterConstraint/properties/recopy",
+ "type": "boolean",
+ "title": "Should this parameter be recopied?",
+ "description": "Whether the parameter should be recopied in response."
+ },
+ "mustMatchRegexp": {
+ "$id": "#/definitions/parameterConstraint/properties/mustMatchRegexp",
+ "type": "string",
+ "title": "A regular expression to match",
+ "description": "A regular expression parameter value must match."
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/jdk_21_maven/cs/rest-gui/microcks/api/microcks-asyncapi-v1.10.yaml b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-asyncapi-v1.10.yaml
new file mode 100644
index 000000000..a2da89ecc
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-asyncapi-v1.10.yaml
@@ -0,0 +1,417 @@
+asyncapi: 3.0.0
+info:
+ title: Microcks Events API v1.10
+ version: 1.10.1
+ description: "Events API offered by Microcks, the Kubernetes native tool for API and microservices\
+ \ mocking and testing (microcks.io)"
+ contact:
+ name: Laurent Broudoux
+ url: https://github.com/microcks
+ email: laurent@microcks.io
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0
+ x-logo:
+ backgroundColor: '#ffffff'
+ url: https://microcks.io/images/microcks-logo-blue.png
+defaultContentType: application/json
+channels:
+ service-changes:
+ description: A channel where Services changes are published
+ messages:
+ serviceChangeEvent:
+ $ref: '#/components/messages/serviceChangeEvent'
+ bindings:
+ kafka:
+ key:
+ type: string
+ bindings:
+ ws:
+ method: POST
+ kafka:
+ topic: 'microcks-services-updates'
+operations:
+ receivedServiceChanges:
+ action: receive
+ channel:
+ $ref: '#/channels/service-changes'
+ summary: Receive information about Service changes
+ messages:
+ - $ref: '#/channels/service-changes/messages/serviceChangeEvent'
+components:
+ messages:
+ serviceChangeEvent:
+ description: An event describing that Service has been modified (created, updated or deleted)
+ payload:
+ $ref: '#/components/schemas/ServiceChangeEvent'
+ schemas:
+ ServiceChangeEvent:
+ type: object
+ required:
+ - serviceId
+ - serviceView
+ - changeType
+ - timestamp
+ properties:
+ serviceId:
+ type: string
+ serviceView:
+ type: object
+ schema:
+ $ref: '#/components/schemas/ServiceView'
+ changeType:
+ type: string
+ enum:
+ - CREATED
+ - UPDATED
+ - DELETED
+ timestamp:
+ type: number
+ format: int32
+ additionalProperties: true
+ ServiceView:
+ description: Aggregate bean for grouping a Service an its messages pairs
+ type: object
+ required:
+ - service
+ - messagesMap
+ properties:
+ service:
+ $ref: '#/components/schemas/Service'
+ description: Wrapped service description
+ messagesMap:
+ type: object
+ description: "Map of messages for this Service. Keys are operation name,\
+ \ values are array of messages for this operation"
+ additionalProperties:
+ $ref: '#/components/schemas/MessageArray'
+ additionalProperties: true
+ Service:
+ description: Represents a Service or API definition as registred into Microcks
+ repository
+ required:
+ - name
+ - version
+ - type
+ - sourceArtifact
+ properties:
+ id:
+ description: Unique identifier for this Service or API
+ type: string
+ name:
+ description: Distinct name for this Service or API (maybe shared among many
+ versions)
+ type: string
+ version:
+ description: Distinct version for a named Service or API
+ type: string
+ type:
+ description: Service or API Type
+ type: string
+ enum:
+ - REST
+ - SOAP_HTTP
+ - GENERIC_REST
+ - GENERIC_EVENT
+ - EVENT
+ - GRPC
+ - GRAPHQL
+ operations:
+ description: Set of Operations for Service or API
+ type: array
+ items:
+ $ref: '#/components/schemas/Operation'
+ xmlNS:
+ description: Associated Xml Namespace in case of Xml based Service
+ type: string
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of Service
+ sourceArtifact:
+ description: Short name of the main/primary artifact this service was created
+ from
+ type: string
+ Metadata:
+ description: Commodity object for holding metadata on any entity. This object
+ is inspired by Kubernetes metadata.
+ type: object
+ required:
+ - createdOn
+ - lastUpdate
+ properties:
+ createdOn:
+ description: Creation date of attached object
+ type: number
+ readOnly: true
+ lastUpdate:
+ description: Last update of attached object
+ type: number
+ readOnly: true
+ annotations:
+ description: Annotations of attached object
+ type: object
+ additionalProperties:
+ type: string
+ labels:
+ description: Labels put on attached object
+ type: object
+ additionalProperties:
+ type: string
+ Operation:
+ description: An Operation of a Service or API
+ type: object
+ required:
+ - name
+ - method
+ properties:
+ name:
+ description: Unique name of this Operation within Service scope
+ type: string
+ method:
+ description: Represents transport method
+ type: string
+ inputName:
+ description: Name of input parameters in case of Xml based Service
+ type: string
+ outputName:
+ description: Name of output parameters in case of Xml based Service
+ type: string
+ dispatcher:
+ description: Dispatcher strategy used for mocks
+ type: string
+ dispatcherRules:
+ description: DispatcherRules used for mocks
+ type: string
+ defaultDelay:
+ description: Default response time delay for mocks
+ type: number
+ resourcePaths:
+ description: Paths the mocks endpoints are mapped on
+ type: array
+ items:
+ type: string
+ parameterContraints:
+ description: Contraints that may apply to mock invocatino on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ bindings:
+ description: Map of protocol binding details for this operation
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Binding'
+ ParameterConstraint:
+ description: Companion object for Operation that may be used to express constraints
+ on request parameters
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ description: Parameter name
+ type: string
+ required:
+ description: Whether it's a required constraint
+ type: boolean
+ recopy:
+ description: Whether it's a recopy constraint
+ type: boolean
+ mustMatchRegexp:
+ description: Whether it's a regular expression matching constraint
+ type: string
+ in:
+ description: Parameter location
+ type: string
+ enum:
+ - path
+ - query
+ - header
+ Binding:
+ description: Protocol binding details for asynchronous operations
+ type: object
+ required:
+ - type
+ - destinationName
+ properties:
+ type:
+ description: Protocol binding identifier
+ type: string
+ enum:
+ - KAFKA
+ - MQTT
+ - WS
+ - AMQP
+ - NATS
+ - GOOGLEPUBSUB
+ - SQS
+ - SNS
+ keyType:
+ description: Type of key for Kafka messages
+ type: string
+ destinationType:
+ description: Type of destination for asynchronous messages of this operation
+ type: string
+ destinationName:
+ description: Name of destination for asynchronous messages of this operation
+ type: string
+ qoS:
+ description: Quality of Service attribute for MQTT binding
+ type: string
+ persistent:
+ description: Persistent attribute for MQTT binding
+ type: boolean
+ method:
+ description: HTTP method for WebSocket binding
+ type: string
+ MessageArray:
+ description: Array of Message for Service operations
+ type: array
+ items:
+ $ref: '#/components/schemas/Exchange'
+ Exchange:
+ description: "Abstract representation of a Service or API exchange type (request/response,\
+ \ event based, ...)"
+ oneOf:
+ - $ref: '#/components/schemas/RequestResponsePair'
+ - $ref: '#/components/schemas/UnidirectionalEvent'
+ discriminator: type
+ AbstractExchange:
+ description: Abstract bean representing a Service or API Exchange.
+ type: object
+ required:
+ - type
+ properties:
+ type:
+ description: Discriminant type for identifying kind of exchange
+ type: string
+ enum:
+ - reqRespPair
+ - unidirEvent
+ RequestResponsePair:
+ description: Request associated with corresponding Response
+ type: object
+ allOf:
+ - type: object
+ properties:
+ request:
+ $ref: '#/components/schemas/Request'
+ description: The request part of the pair
+ response:
+ $ref: '#/components/schemas/Response'
+ description: The Response part of the pair
+ required:
+ - request
+ - response
+ - $ref: '#/components/schemas/AbstractExchange'
+ UnidirectionalEvent:
+ description: Representation of an unidirectional exchange as an event message
+ type: object
+ allOf:
+ - type: object
+ required:
+ - eventMessage
+ properties:
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Asynchronous message for this unidirectional event
+ - $ref: '#/components/schemas/AbstractExchange'
+ Request:
+ description: A mock invocation or test request
+ required:
+ - name
+ - operationId
+ properties:
+ id:
+ description: Unique identifier of Request
+ type: string
+ name:
+ description: Unique distinct name of this Request
+ type: string
+ content:
+ description: Body content for this request
+ type: string
+ operationId:
+ description: Identifier of Operation this Request is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Request is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Request
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Response:
+ description: A mock invocation or test response
+ required:
+ - operationId
+ - name
+ properties:
+ operationId:
+ description: Identifier of Operation this Response is associated to
+ type: string
+ content:
+ description: Body content of this Response
+ type: string
+ id:
+ description: Unique identifier of Response
+ type: string
+ name:
+ description: Unique distinct name of this Response
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Response is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Response
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Header:
+ description: Transport headers for both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this Header
+ type: array
+ items:
+ type: string
+ EventMessage:
+ description: A mock event message
+ required:
+ - id
+ - mediaType
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this message
+ type: string
+ mediaType:
+ description: Content type of message
+ type: string
+ name:
+ description: Unique distinct name of this message
+ type: string
+ content:
+ description: Body content for this message
+ type: string
+ operationId:
+ description: Identifier of Operation this message is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this message is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this message
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
diff --git a/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.0.yaml b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.0.yaml
new file mode 100644
index 000000000..99d252c65
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.0.yaml
@@ -0,0 +1,1463 @@
+---
+openapi: 3.0.2
+info:
+ title: Microcks API v1.0
+ version: 1.0.0
+ description: API offered by Microcks, the mock and testing platform for API and
+ microservices (microcks.github.io)
+ contact:
+ name: Laurent Broudoux
+ url: https://github.com/lbroudoux
+ email: laurent.broudoux@gmail.com
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0
+servers:
+- url: http://microcks.example.com/api
+ description: ""
+paths:
+ /services:
+ summary: This path operations deal with Services
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: page
+ description: Page of Services to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of Services to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServices
+ summary: Get Services and APIs
+ /tests:
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestRequest'
+ required: true
+ tags:
+ - test
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Created TestResult (empty shell cause tests are executed asynchronously)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateTest
+ summary: Create a new Test
+ /services/count:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Services in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServicesCounter
+ summary: Get the Services counter
+ /jobs:
+ summary: This path operations deal with ImportJobs
+ get:
+ tags:
+ - job
+ parameters:
+ - name: page
+ description: Page of ImportJobs to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of ImportJobs to include in a
+ response (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ - name: name
+ description: Name like criterion for query
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ImportJob'
+ description: List of found ImportJobs
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobs
+ summary: Get ImportJobs
+ description: Retrieve a list of ImportJobs
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Created ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateImportJob
+ summary: Create ImportJob
+ description: Create a new ImportJob
+ /jobs/{id}:
+ summary: This path or subpaths operations deal with specific ImportJob having
+ given id
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Found ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ summary: Get ImportJob
+ description: Retrieve an ImportJob using its identifier
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Updated ImportJob
+ summary: Update ImportJob
+ description: Update an ImportJob
+ delete:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: ImportJob deleted
+ security:
+ - jwt-bearer:
+ - user:identity
+ - admin
+ operationId: DeleteImportJob
+ summary: Delete ImportJob
+ description: Delete an ImportJob
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/activate:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: ImportJob is activated
+ security:
+ - jwt-bearer:
+ - user
+ operationId: ActivateImportJob
+ summary: Activate an ImportJob
+ description: Make an ImportJob active, so that it is executed
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/start:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Started ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: StartImportJob
+ summary: Start an ImportJob
+ description: Starting an ImportJob forces it to immediatly import mock definitions
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/stop:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Stopped ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: StopImportJob
+ summary: Stop an ImportJob
+ description: Stopping an ImportJob desactivate it, so that it won't execute
+ at next schedule
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: messages
+ description: Whether to include details on services messages into result.
+ Default is false
+ schema:
+ type: boolean
+ in: query
+ responses:
+ "200":
+ $ref: '#/components/responses/ServiceResponse'
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetService
+ summary: Get Service
+ delete:
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: DeleteService
+ summary: Delete Service
+ description: Delete a Service
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /artifact/upload:
+ summary: Deals with artifacts (SOAP UI project, Postman collection or OpenAPI
+ Specification) to be imported by Microcks.
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/ArtifactUpload'
+ examples:
+ Artifact upload:
+ value: |
+ POST /api/artifact/upload HTTP/1.1
+ Host: microcks
+ User-Agent: curl/7.54.0
+ Accept: */*
+ Authorization: Bearer
+ Content-Length: 2743
+ Expect: 100-continue
+ Content-Type: multipart/form-data; boundary=------------------------8af8cbb56dd4bde0
+
+ --------------------------8af8cbb56dd4bde0
+ Content-Disposition: form-data; name="file"; filename="github.json"
+ Content-Type: application/octet-stream
+
+ THE ARTIFACT HERE
+
+ --------------------------8af8cbb56dd4bde0--
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact was imported and Service found
+ "204":
+ description: No file attribute found in uploaded data
+ "400":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact content is invalid and not understood
+ operationId: uploadArtifact
+ summary: Upload an artifact
+ description: Uploads an artifact (SOAP UI project, Postman collection or OpenAPI
+ Specification) to be imported by Microcks.
+ /jobs/count:
+ summary: Count ImportJobs
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of ImportJobs in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobCounter
+ summary: Get the ImportJobs counter
+ /secrets:
+ summary: This path operations deal with Secrets
+ get:
+ tags:
+ - config
+ parameters:
+ - name: page
+ description: Page of Secrets to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ required: false
+ - name: size
+ description: Size of a page. Maximum number of Secrets to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ required: false
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Secret'
+ description: List of found Secrets
+ security:
+ - jwt-bearer:
+ - user
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ tags:
+ - config
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Created Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: CreateSecret
+ summary: Create a new Secret
+ /secrets/{id}:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Found Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetSecret
+ summary: Get Secret
+ description: Retrieve a Secret
+ put:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Updated Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: UpdateSecret
+ summary: Update Secret
+ description: Update a Secret
+ delete:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Secret has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: DeleteSecret
+ summary: Delete Secret
+ description: Delete a Secret
+ parameters:
+ - name: id
+ description: Unique identifier of Secret to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /secrets/count:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Secrets in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecretsCounter
+ summary: Get the Secrets counter
+ /tests/service/{serviceId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResult'
+ description: List of TestResults for the Service having the requested id
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByService
+ summary: Get TestResults by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/service/{serviceId}/count:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of TestResults for this Service in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByServiceCounter
+ summary: Get the TestResults for Service counter
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Requested TestResult
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResult
+ summary: Get TestResult
+ description: ""
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/messages/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RequestResponsePair'
+ description: List of request and response messages for this TestCase
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetMessagesByTestCase
+ summary: Get messages for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/testCaseResult:
+ post:
+ requestBody:
+ description: TestCase return wrapper object
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseReturnDTO'
+ required: true
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseResult'
+ description: TestCaseResult is reported
+ operationId: ReportTestCaseResult
+ summary: Report and create a new TestCaseResult
+ description: Report a TestCaseResult (typically used by a Test runner)
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /keycloak/config:
+ summary: Keycloak Authentification configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KeycloakConfig'
+ description: Get current configuration
+ operationId: GetKeycloakConfig
+ summary: Get authentification configuration
+ /services/{id}/operation:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OperationOverrideDTO'
+ required: true
+ tags:
+ - mock
+ parameters:
+ - name: operationName
+ description: Name of operation to update
+ schema:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ description: Operation has been updated
+ "500":
+ description: Operation cannot be updated
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: OverrideServiceOperation
+ summary: Override Service Operation
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}/metadata:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Metadata'
+ required: true
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service metadata has been updated
+ "500":
+ description: Update of metadata failed
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: UpdateServiceMetadata
+ summary: Update Service Metadata
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/labels:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LabelsMap'
+ description: 'Already used labels: keys are label Keys, values are array
+ of label Values'
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetServicesLabels
+ summary: Get the already used labels for Services
+ /services/search:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: queryMap
+ description: Map of criterion. Key can be simply 'name' with value as the
+ searched string. You can also search by label using keys like 'labels.x'
+ where 'x' is the label and value the label value
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services (filtered according search criteria)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: SearchServices
+ summary: Search for Services and APIs
+components:
+ schemas:
+ TestCaseResult:
+ description: Companion objects for TestResult. Each TestCaseResult correspond
+ to a particuliar service operation / action reference by the operationName
+ field. TestCaseResults owns a collection of TestStepResults (one for every
+ request associated to service operation / action).
+ required:
+ - success
+ - elapsedTime
+ - operationName
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test case beginning
+ type: number
+ operationName:
+ description: Name of operation this test case is bound to
+ type: string
+ testStepResults:
+ description: Test steps associated to this test case
+ type: array
+ items:
+ $ref: '#/components/schemas/TestStepResult'
+ TestRunnerType:
+ description: Type of test strategy (different strategies are implemented by
+ different runners)
+ type: array
+ items:
+ enum:
+ - HTTP
+ - SOAP_HTTP
+ - SOAP_UI
+ - POSTMAN
+ - OPEN_API_SCHEMA
+ type: string
+ Service:
+ description: Represents a Service or API definition as registred into Microcks
+ repository
+ required:
+ - name
+ - version
+ - type
+ properties:
+ id:
+ description: Unique identifier for this Service or API
+ type: string
+ name:
+ description: Distinct name for this Service or API (maybe shared among many
+ versions)
+ type: string
+ version:
+ description: Distinct version for a named Service or API
+ type: string
+ type:
+ description: Service or API Type
+ enum:
+ - REST
+ - SOAP_HTTP
+ - GENERIC_REST
+ - EVENT
+ type: string
+ operations:
+ description: Set of Operations for Service or API
+ type: array
+ items:
+ $ref: '#/components/schemas/Operation'
+ xmlNS:
+ description: Associated Xml Namespace in case of Xml based Service
+ type: string
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of Service
+ TestRequest:
+ description: Test request is a minimalist wrapper for requesting the launch
+ of a new test
+ required:
+ - serviceId
+ - testEndpoint
+ - runnerType
+ properties:
+ serviceId:
+ description: Unique identifier of service to test
+ type: string
+ testEndpoint:
+ description: Endpoint to test for this service
+ type: string
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ ImportJob:
+ description: An ImportJob allow defining a repository artifact to poll for discovering
+ Services and APIs mocks and tests
+ required:
+ - name
+ - repositoryUrl
+ properties:
+ id:
+ description: Unique identifier of ImportJob
+ type: string
+ name:
+ description: Unique distinct name of this ImportJob
+ type: string
+ repositoryUrl:
+ description: URL of mocks and tests repository artifact
+ type: string
+ repositoryDisableSSLValidation:
+ description: Wether to disable SSL certificate verification when checking
+ repository
+ type: boolean
+ frequency:
+ description: Reserved for future usage
+ type: string
+ createdDate:
+ format: date-time
+ description: Creation date for this ImportJob
+ type: string
+ lastImportDate:
+ format: date-time
+ description: Date last import was done
+ type: string
+ lastImportError:
+ description: Error message of last import (if any)
+ type: string
+ active:
+ description: Wether this ImportJob is active (ie. scheduled for execution)
+ type: boolean
+ etag:
+ description: Etag of repository URL during previous import. Is used for
+ not re-importing if no recent changes
+ type: string
+ serviceRefs:
+ description: References of Services discovered when checking repository
+ type: array
+ items:
+ $ref: '#/components/schemas/ServiceRef'
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: Reference of a Secret to used when checking repository
+ ServiceRef:
+ description: Lightweight reference of an existing Service
+ required:
+ - serviceId
+ - name
+ - version
+ properties:
+ serviceId:
+ description: Unique reference of a Service
+ type: string
+ name:
+ description: The Service name
+ type: string
+ version:
+ description: The Service version
+ type: string
+ SecretRef:
+ description: Lightweight reference for an existing Secret
+ required:
+ - secretId
+ - name
+ properties:
+ secretId:
+ description: Unique identifier or referenced Secret
+ type: string
+ name:
+ description: Distinct name of the referenced Secret
+ type: string
+ example: |-
+ {
+ "secretId": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal"
+ }
+ Secret:
+ description: A Secret allows grouping informations on how to access a restricted
+ resource such as a repsoitory URL. Secrets are typically used by ImpoortJobs.
+ required:
+ - name
+ - description
+ properties:
+ id:
+ description: Unique identifier of Secret
+ type: string
+ name:
+ description: Unique distinct name of Secret
+ type: string
+ username:
+ type: string
+ password:
+ type: string
+ token:
+ type: string
+ tokenHeader:
+ type: string
+ caCertPem:
+ type: string
+ description:
+ description: Description of this Secret
+ type: string
+ example: |-
+ {
+ "id": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal",
+ "description": "Gogs internal corporate repository",
+ "username": "team",
+ "password": "team",
+ "caCertPem": "-----BEGIN CERTIFICATE-----\nMIIC6jCCAdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu\nc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIwHhcNMTgwNzE4MTA0ODIyWhcNMjMwNzE3\nMTA0ODIzWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIw\nggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCyaP1jlpnm8WpfCSnUa8Qt\nhdUynOLLgElUtpWoW25wB9tO2ZmEj+fVsTyzEsW8+nfXXfRsBEzPm2ze9uEMTPTB\nAY0k7DbLZfjmF1lCckUvvh1rR/8hoPuXETjXUuOdtm7gRHTOxLQyH2Qi/q0DYJAn\nprKyRCLa35pRnykL6v4bHkqFnqDEho63i29XHhm2703moh4YCl1iYa2Rh6D44cjn\n8lBCq6o7zoZSmc/aBamRkQrfZYcolR8OUtDS4oEB0zMftmea2ycashsLEMB+Cq4r\n64NI2QM7qOxdTuXsDivHfLl7RTuWEOozGaJXoiPaGU/3d/KnY0gKJ2TC1KXt6Xjn\nAgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG\nSIb3DQEBCwUAA4IBAQCeUmxfUzw0VAFG6HvVYIsfvumiIvsSWmclGIZqNJyfMHFD\nMy6xzPRNNfWe5aumGTJsuIzuXfDRcdO7KmH1d2/5brkvWpxp6svVrYPvcoXjl4VN\nQR2mv5Di4KHfiiwvP3eeewjUZj+uREGqX2fcbJPHTPy32Kpb0H8Uy09BklhjC7QP\ngRAGexPhU1oBL/CoOwbHKcQ6dxs/y1SxzI8gXEtec4z62CroI13iT7U0UjSqFBE4\nKfrJombfz0d68781Z40ll+8my251ZNfbLBhQ3UHW0JnkBEQkE1aBorUoj2iakYvx\nA2qZh+8q2b8MwMb2YsQ0dlxKd6c4tN3lmMnO4bnd\n-----END CERTIFICATE-----"
+ }
+ ArtifactUpload:
+ title: Root Type for ArtifactUpload
+ description: |-
+ Artifact (SOAP UI project, Postman collection or OpenAPI Specification) to be imported by Microcks.
+ This structure represents a mime-multipart file upload (as specified here: https://swagger.io/docs/specification/describing-request-body/file-upload/)
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The artifact to upload
+ type: string
+ Counter:
+ title: Root Type for Counter
+ description: The root of the Counter type's schema.
+ type: object
+ properties:
+ counter:
+ format: int32
+ description: Number of items in a resource collection
+ type: integer
+ example: |-
+ {
+ "counter": 12
+ }
+ TestCaseReturnDTO:
+ required:
+ - operationName
+ properties:
+ operationName:
+ description: Name of related operation for this TestCase
+ type: string
+ TestReturn:
+ description: TestReturn is used for wrapping the return code of a test step
+ execution
+ required:
+ - code
+ - elapsedTime
+ - request
+ - response
+ properties:
+ code:
+ description: Return code for test (0 means Success, 1 means Failure)
+ type: integer
+ elapsedTime:
+ format: int64
+ description: Elapsed time in milliseconds
+ type: integer
+ message:
+ description: Error message if any
+ type: string
+ request:
+ $ref: '#/components/schemas/Request'
+ description: Request sent for this test
+ response:
+ $ref: '#/components/schemas/Response'
+ description: Response returned for this test
+ Request:
+ description: A mock invocation or test request
+ required:
+ - name
+ - operationId
+ properties:
+ id:
+ description: Unique identifier of Request
+ type: string
+ name:
+ description: Unique distinct name of this Request
+ type: string
+ content:
+ description: Body content for this request
+ type: string
+ operationId:
+ description: Identifier of Operation this Request is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Request is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Request
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Response:
+ description: A mock invocation or test response
+ required:
+ - operationId
+ - name
+ properties:
+ operationId:
+ description: Identifier of Operation this Response is associated to
+ type: string
+ content:
+ description: Body content of this Response
+ type: string
+ id:
+ description: Unique identifier of Response
+ type: string
+ name:
+ description: Unique distinct name of this Response
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Response is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Response
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Header:
+ description: Transport headers for both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this Header
+ type: array
+ items:
+ type: string
+ TestStepResult:
+ description: TestStepResult is an entity embedded within TestCaseResult. They
+ are created for each request associated with an operation / action of a microservice.
+ required:
+ - success
+ - elapsedTome
+ - requestName
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test step beginning
+ type: number
+ requestName:
+ description: Name of request this test step is bound to
+ type: string
+ message:
+ description: Error message that may be associated to this test step
+ type: string
+ KeycloakConfig:
+ description: Representation of Keycloak / SSO configuration used by Microcks
+ server
+ required:
+ - realm
+ - auth-server-url
+ - public-client
+ - ssl-required
+ - resource
+ type: object
+ properties:
+ realm:
+ description: Authentication realm name
+ type: string
+ auth-server-url:
+ description: SSO Server authentication url
+ type: string
+ public-client:
+ description: Name of public-client that can be used for requesting OAuth
+ token
+ type: string
+ ssl-required:
+ description: SSL certificates requirements
+ enum:
+ - none
+ - external
+ resource:
+ description: Name of Keycloak resource/application used on client side
+ type: string
+ RequestResponsePair:
+ description: Request associated with corresponding Response
+ type: object
+ allOf:
+ - required:
+ - request
+ - response
+ type: object
+ properties:
+ request:
+ $ref: '#/components/schemas/Request'
+ description: The request part of the pair
+ response:
+ $ref: '#/components/schemas/Response'
+ description: The Response part of the pair
+ - $ref: '#/components/schemas/AbstractExchange'
+ TestResult:
+ description: Represents the result of a Service or API test run by Microcks.
+ Tests are related to a service and made of multiple test cases corresponding
+ to each operations / actions composing service. Tests are run against a specific
+ endpoint named testedEndpoint. It holds global markers telling if test still
+ ran, is a success, how many times is has taken and so on ...
+ required:
+ - id
+ - version
+ - testNumber
+ - testedEndpoint
+ - serviceId
+ - success
+ - inProgress
+ - runnerType
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ version:
+ description: Revision number of this test
+ type: number
+ testNumber:
+ description: Incremental number for tracking number of tests of a service
+ type: number
+ testedEndpoint:
+ description: Endpoint used during test
+ type: string
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ elapsedTime:
+ description: Elapsed time in milliseconds since test beginning
+ type: number
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ inProgress:
+ description: Flag telling is test is still in progress
+ type: boolean
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ testCaseResults:
+ description: TestCase results associated to this test
+ type: array
+ items:
+ $ref: '#/components/schemas/TestCaseResult'
+ OperationOverrideDTO:
+ description: Data Transfer object for grouping the mutable properties of an
+ Operation
+ type: object
+ properties:
+ dispatcher:
+ description: Type of dispatcher to apply for this operation
+ type: string
+ dispatcherRules:
+ description: Rules of dispatcher for this operation
+ type: string
+ defaultDelay:
+ description: Default delay in milliseconds to apply to mock responses on
+ this operation
+ type: integer
+ parameterConstraints:
+ description: Constraints that may apply to incoming parameters on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ ParameterConstraint:
+ description: Companion object for Operation that may be used to express constraints
+ on request parameters
+ required:
+ - name
+ type: object
+ properties:
+ name:
+ description: Parameter name
+ type: string
+ required:
+ description: Whether it's a required constraint
+ type: boolean
+ recopy:
+ description: Whether it's a recopy constraint
+ type: boolean
+ mustMatchRegexp:
+ description: Whether it's a regular expression matching constraint
+ type: string
+ in:
+ description: Parameter location
+ enum:
+ - path
+ - query
+ - header
+ type: string
+ Metadata:
+ description: Commodity object for holding metadata on any entity. This object
+ is inspired by Kubernetes metadata.
+ required:
+ - createdOn
+ - lastUpdate
+ type: object
+ properties:
+ createdOn:
+ description: Creation date of attached object
+ type: integer
+ lastUpdate:
+ description: Last update of attached object
+ type: integer
+ annotations:
+ description: Annotations of attached object
+ type: object
+ additionalProperties:
+ type: string
+ labels:
+ description: Labels put on attached object
+ type: object
+ additionalProperties:
+ type: string
+ Binding:
+ description: Protocol binding details for asynchronous operations
+ required:
+ - type
+ - destinationName
+ type: object
+ properties:
+ type:
+ description: Protocol binding identifier
+ enum:
+ - KAFKA
+ type: string
+ keyType:
+ description: Type of key for Kafka messages
+ type: string
+ destinationType:
+ description: Type of destination for asynchronous messages of this operation
+ type: string
+ destinationName:
+ description: Name of destination for asynchronous messages of this operation
+ type: string
+ Operation:
+ description: An Operation of a Service or API
+ required:
+ - name
+ - method
+ type: object
+ properties:
+ name:
+ description: Unique name of this Operation within Service scope
+ type: string
+ method:
+ description: Represents transport method
+ type: string
+ inputName:
+ description: Name of input parameters in case of Xml based Service
+ type: string
+ outputName:
+ description: Name of output parameters in case of Xml based Service
+ type: string
+ dispatcher:
+ description: Dispatcher strategy used for mocks
+ type: string
+ dispatcherRules:
+ description: DispactherRules used for mocks
+ type: string
+ defaultDelay:
+ description: Default response time delay for mocks
+ type: number
+ resourcePaths:
+ description: Paths the mocks endpoints are mapped on
+ type: array
+ items:
+ type: string
+ parameterContraints:
+ description: Contraints that may apply to mock invocatino on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ bindings:
+ description: Map of protocol binding details for this operation
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Binding'
+ LabelsMap:
+ description: A map which keys are already used labels keys and values are already
+ used values for this key
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/StringArray'
+ type: object
+ UnidirectionalEvent:
+ description: Representation of an unidirectional exchange as an event message
+ type: object
+ allOf:
+ - required:
+ - eventMessage
+ type: object
+ properties:
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Asynchronous message for this unidirectional event
+ - $ref: '#/components/schemas/AbstractExchange'
+ EventMessage:
+ description: ""
+ required:
+ - id
+ - mediaType
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this message
+ type: string
+ mediaType:
+ description: Content type of message
+ type: string
+ name:
+ description: Unique distinct name of this message
+ type: string
+ content:
+ description: Body content for this message
+ type: string
+ operationId:
+ description: Identifier of Operation this message is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this message is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this message
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ StringArray:
+ description: A simple array of String
+ type: array
+ items:
+ type: string
+ MessageArray:
+ description: Array of Message for Service operations
+ type: array
+ items:
+ $ref: '#/components/schemas/Exchange'
+ Exchange:
+ oneOf:
+ - $ref: '#/components/schemas/RequestResponsePair'
+ - $ref: '#/components/schemas/UnidirectionalEvent'
+ discriminator:
+ propertyName: type
+ mapping:
+ reqRespPair: '#/components/schemas/RequestResponsePair'
+ unidirEvent: '#/components/schemas/UnidirectionalEvent'
+ AbstractExchange:
+ description: Abstract bean representing a Service or API Exchange.
+ required:
+ - type
+ type: object
+ properties:
+ type:
+ description: Discriminant type for identifying kind of exchange
+ enum:
+ - reqRespPair
+ - unidirEvent
+ type: string
+ ServiceView:
+ description: Aggregate bean for grouping a Service an its messages pairs
+ required:
+ - service
+ - messagesMap
+ type: object
+ properties:
+ service:
+ $ref: '#/components/schemas/Service'
+ description: Wrapped service description
+ messagesMap:
+ description: Map of messages for this Service. Keys are operation name,
+ values are array of messages for this operation
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MessageArray'
+ responses:
+ ServiceResponse:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/Service'
+ - $ref: '#/components/schemas/ServiceView'
+ description: ""
+ securitySchemes:
+ jwt-bearer:
+ flows:
+ clientCredentials:
+ tokenUrl: https://keycloak.example.com/auth/realms/microcks/protocol/openid-connect/token
+ refreshUrl: https://keycloak.example.com/auth/realms/microcks/protocol/openid-connect/token
+ scopes:
+ user: ""
+ manager: ""
+ admin: ""
+ type: oauth2
+ description: JWT Bearer acquired using OAuth 2 Authentication flow or Direct
+ Access Grant
+security:
+- jwt-bearer: []
+tags:
+- name: mock
+ description: Operations related to API and Services mocks
+- name: test
+ description: Operations related to API and Services tests
+- name: job
+ description: Operations related to Jobs for discovering mocks and tests
+- name: config
+ description: Operations related to configuration
diff --git a/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.1.yaml b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.1.yaml
new file mode 100644
index 000000000..7093d5417
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.1.yaml
@@ -0,0 +1,1526 @@
+---
+openapi: 3.0.2
+info:
+ title: Microcks API v1.1
+ version: 1.1.0
+ description: API offered by Microcks, the mock and testing platform for API and
+ microservices (microcks.github.io)
+ contact:
+ name: Laurent Broudoux
+ url: https://github.com/lbroudoux
+ email: laurent.broudoux@gmail.com
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0
+servers:
+- url: http://microcks.example.com/api
+ description: ""
+paths:
+ /services:
+ summary: This path operations deal with Services
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: page
+ description: Page of Services to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of Services to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServices
+ summary: Get Services and APIs
+ /tests:
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestRequest'
+ required: true
+ tags:
+ - test
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Created TestResult (empty shell cause tests are executed asynchronously)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateTest
+ summary: Create a new Test
+ /services/count:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Services in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServicesCounter
+ summary: Get the Services counter
+ /jobs:
+ summary: This path operations deal with ImportJobs
+ get:
+ tags:
+ - job
+ parameters:
+ - name: page
+ description: Page of ImportJobs to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of ImportJobs to include in a
+ response (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ - name: name
+ description: Name like criterion for query
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ImportJob'
+ description: List of found ImportJobs
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobs
+ summary: Get ImportJobs
+ description: Retrieve a list of ImportJobs
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Created ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateImportJob
+ summary: Create ImportJob
+ description: Create a new ImportJob
+ /jobs/{id}:
+ summary: This path or subpaths operations deal with specific ImportJob having
+ given id
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Found ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ summary: Get ImportJob
+ description: Retrieve an ImportJob using its identifier
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Updated ImportJob
+ summary: Update ImportJob
+ description: Update an ImportJob
+ delete:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: ImportJob deleted
+ security:
+ - jwt-bearer:
+ - user:identity
+ - admin
+ operationId: DeleteImportJob
+ summary: Delete ImportJob
+ description: Delete an ImportJob
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/activate:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: ImportJob is activated
+ security:
+ - jwt-bearer:
+ - user
+ operationId: ActivateImportJob
+ summary: Activate an ImportJob
+ description: Make an ImportJob active, so that it is executed
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/start:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Started ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: StartImportJob
+ summary: Start an ImportJob
+ description: Starting an ImportJob forces it to immediatly import mock definitions
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/stop:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Stopped ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: StopImportJob
+ summary: Stop an ImportJob
+ description: Stopping an ImportJob desactivate it, so that it won't execute
+ at next schedule
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: messages
+ description: Whether to include details on services messages into result.
+ Default is false
+ schema:
+ type: boolean
+ in: query
+ responses:
+ "200":
+ $ref: '#/components/responses/ServiceResponse'
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetService
+ summary: Get Service
+ delete:
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: DeleteService
+ summary: Delete Service
+ description: Delete a Service
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /artifact/upload:
+ summary: Deals with artifacts (SOAP UI project, Postman collection or OpenAPI
+ Specification) to be imported by Microcks.
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/ArtifactUpload'
+ examples:
+ Artifact upload:
+ value: |
+ POST /api/artifact/upload HTTP/1.1
+ Host: microcks
+ User-Agent: curl/7.54.0
+ Accept: */*
+ Authorization: Bearer
+ Content-Length: 2743
+ Expect: 100-continue
+ Content-Type: multipart/form-data; boundary=------------------------8af8cbb56dd4bde0
+
+ --------------------------8af8cbb56dd4bde0
+ Content-Disposition: form-data; name="file"; filename="github.json"
+ Content-Type: application/octet-stream
+
+ THE ARTIFACT HERE
+
+ --------------------------8af8cbb56dd4bde0--
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact was imported and Service found
+ "204":
+ description: No file attribute found in uploaded data
+ "400":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact content is invalid and not understood
+ operationId: uploadArtifact
+ summary: Upload an artifact
+ description: Uploads an artifact (SOAP UI project, Postman collection or OpenAPI
+ Specification) to be imported by Microcks.
+ /jobs/count:
+ summary: Count ImportJobs
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of ImportJobs in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobCounter
+ summary: Get the ImportJobs counter
+ /secrets:
+ summary: This path operations deal with Secrets
+ get:
+ tags:
+ - config
+ parameters:
+ - name: page
+ description: Page of Secrets to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ required: false
+ - name: size
+ description: Size of a page. Maximum number of Secrets to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ required: false
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Secret'
+ description: List of found Secrets
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecrets
+ summary: Get Secrets
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ tags:
+ - config
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Created Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: CreateSecret
+ summary: Create a new Secret
+ /secrets/{id}:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Found Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetSecret
+ summary: Get Secret
+ description: Retrieve a Secret
+ put:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Updated Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: UpdateSecret
+ summary: Update Secret
+ description: Update a Secret
+ delete:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Secret has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: DeleteSecret
+ summary: Delete Secret
+ description: Delete a Secret
+ parameters:
+ - name: id
+ description: Unique identifier of Secret to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /secrets/count:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Secrets in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecretsCounter
+ summary: Get the Secrets counter
+ /tests/service/{serviceId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResult'
+ description: List of TestResults for the Service having the requested id
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByService
+ summary: Get TestResults by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/service/{serviceId}/count:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of TestResults for this Service in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByServiceCounter
+ summary: Get the TestResults for Service counter
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Requested TestResult
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResult
+ summary: Get TestResult
+ description: ""
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/messages/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RequestResponsePair'
+ description: List of request and response messages for this TestCase
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetMessagesByTestCase
+ summary: Get messages for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/testCaseResult:
+ post:
+ requestBody:
+ description: TestCase return wrapper object
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseReturnDTO'
+ required: true
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseResult'
+ description: TestCaseResult is reported
+ operationId: ReportTestCaseResult
+ summary: Report and create a new TestCaseResult
+ description: Report a TestCaseResult (typically used by a Test runner)
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /keycloak/config:
+ summary: Keycloak Authentification configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KeycloakConfig'
+ description: Get current configuration
+ operationId: GetKeycloakConfig
+ summary: Get authentification configuration
+ /services/{id}/operation:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OperationOverrideDTO'
+ required: true
+ tags:
+ - mock
+ parameters:
+ - name: operationName
+ description: Name of operation to update
+ schema:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ description: Operation has been updated
+ "500":
+ description: Operation cannot be updated
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: OverrideServiceOperation
+ summary: Override Service Operation
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}/metadata:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Metadata'
+ required: true
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service metadata has been updated
+ "500":
+ description: Update of metadata failed
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: UpdateServiceMetadata
+ summary: Update Service Metadata
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/labels:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LabelsMap'
+ description: 'Already used labels: keys are label Keys, values are array
+ of label Values'
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetServicesLabels
+ summary: Get the already used labels for Services
+ /services/search:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: queryMap
+ description: Map of criterion. Key can be simply 'name' with value as the
+ searched string. You can also search by label using keys like 'labels.x'
+ where 'x' is the label and value the label value
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services (filtered according search criteria)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: SearchServices
+ summary: Search for Services and APIs
+ /tests/{id}/events/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/UnidirectionalEvent'
+ description: List of event messages for this TestCase
+ operationId: GetEventsByTestCase
+ summary: Get events for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+components:
+ schemas:
+ TestCaseResult:
+ description: Companion objects for TestResult. Each TestCaseResult correspond
+ to a particuliar service operation / action reference by the operationName
+ field. TestCaseResults owns a collection of TestStepResults (one for every
+ request associated to service operation / action).
+ required:
+ - success
+ - elapsedTime
+ - operationName
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test case beginning
+ type: number
+ operationName:
+ description: Name of operation this test case is bound to
+ type: string
+ testStepResults:
+ description: Test steps associated to this test case
+ type: array
+ items:
+ $ref: '#/components/schemas/TestStepResult'
+ Service:
+ description: Represents a Service or API definition as registred into Microcks
+ repository
+ required:
+ - name
+ - version
+ - type
+ properties:
+ id:
+ description: Unique identifier for this Service or API
+ type: string
+ name:
+ description: Distinct name for this Service or API (maybe shared among many
+ versions)
+ type: string
+ version:
+ description: Distinct version for a named Service or API
+ type: string
+ type:
+ description: Service or API Type
+ enum:
+ - REST
+ - SOAP_HTTP
+ - GENERIC_REST
+ - EVENT
+ type: string
+ operations:
+ description: Set of Operations for Service or API
+ type: array
+ items:
+ $ref: '#/components/schemas/Operation'
+ xmlNS:
+ description: Associated Xml Namespace in case of Xml based Service
+ type: string
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of Service
+ TestRequest:
+ description: Test request is a minimalist wrapper for requesting the launch
+ of a new test
+ required:
+ - serviceId
+ - testEndpoint
+ - runnerType
+ properties:
+ serviceId:
+ description: Unique identifier of service to test
+ type: string
+ testEndpoint:
+ description: Endpoint to test for this service
+ type: string
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ filteredOperations:
+ description: A restriction on service operations to test
+ type: array
+ items:
+ type: string
+ secretName:
+ description: The name of Secret to use for connecting the test endpoint
+ type: string
+ ImportJob:
+ description: An ImportJob allow defining a repository artifact to poll for discovering
+ Services and APIs mocks and tests
+ required:
+ - name
+ - repositoryUrl
+ properties:
+ id:
+ description: Unique identifier of ImportJob
+ type: string
+ name:
+ description: Unique distinct name of this ImportJob
+ type: string
+ repositoryUrl:
+ description: URL of mocks and tests repository artifact
+ type: string
+ repositoryDisableSSLValidation:
+ description: Wether to disable SSL certificate verification when checking
+ repository
+ type: boolean
+ frequency:
+ description: Reserved for future usage
+ type: string
+ createdDate:
+ format: date-time
+ description: Creation date for this ImportJob
+ type: string
+ lastImportDate:
+ format: date-time
+ description: Date last import was done
+ type: string
+ lastImportError:
+ description: Error message of last import (if any)
+ type: string
+ active:
+ description: Wether this ImportJob is active (ie. scheduled for execution)
+ type: boolean
+ etag:
+ description: Etag of repository URL during previous import. Is used for
+ not re-importing if no recent changes
+ type: string
+ serviceRefs:
+ description: References of Services discovered when checking repository
+ type: array
+ items:
+ $ref: '#/components/schemas/ServiceRef'
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: Reference of a Secret to used when checking repository
+ ServiceRef:
+ description: Lightweight reference of an existing Service
+ required:
+ - serviceId
+ - name
+ - version
+ properties:
+ serviceId:
+ description: Unique reference of a Service
+ type: string
+ name:
+ description: The Service name
+ type: string
+ version:
+ description: The Service version
+ type: string
+ SecretRef:
+ description: Lightweight reference for an existing Secret
+ required:
+ - secretId
+ - name
+ properties:
+ secretId:
+ description: Unique identifier or referenced Secret
+ type: string
+ name:
+ description: Distinct name of the referenced Secret
+ type: string
+ example: |-
+ {
+ "secretId": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal"
+ }
+ Secret:
+ description: A Secret allows grouping informations on how to access a restricted
+ resource such as a repsoitory URL. Secrets are typically used by ImpoortJobs.
+ required:
+ - name
+ - description
+ properties:
+ id:
+ description: Unique identifier of Secret
+ type: string
+ name:
+ description: Unique distinct name of Secret
+ type: string
+ username:
+ type: string
+ password:
+ type: string
+ token:
+ type: string
+ tokenHeader:
+ type: string
+ caCertPem:
+ type: string
+ description:
+ description: Description of this Secret
+ type: string
+ example: |-
+ {
+ "id": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal",
+ "description": "Gogs internal corporate repository",
+ "username": "team",
+ "password": "team",
+ "caCertPem": "-----BEGIN CERTIFICATE-----\nMIIC6jCCAdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu\nc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIwHhcNMTgwNzE4MTA0ODIyWhcNMjMwNzE3\nMTA0ODIzWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIw\nggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCyaP1jlpnm8WpfCSnUa8Qt\nhdUynOLLgElUtpWoW25wB9tO2ZmEj+fVsTyzEsW8+nfXXfRsBEzPm2ze9uEMTPTB\nAY0k7DbLZfjmF1lCckUvvh1rR/8hoPuXETjXUuOdtm7gRHTOxLQyH2Qi/q0DYJAn\nprKyRCLa35pRnykL6v4bHkqFnqDEho63i29XHhm2703moh4YCl1iYa2Rh6D44cjn\n8lBCq6o7zoZSmc/aBamRkQrfZYcolR8OUtDS4oEB0zMftmea2ycashsLEMB+Cq4r\n64NI2QM7qOxdTuXsDivHfLl7RTuWEOozGaJXoiPaGU/3d/KnY0gKJ2TC1KXt6Xjn\nAgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG\nSIb3DQEBCwUAA4IBAQCeUmxfUzw0VAFG6HvVYIsfvumiIvsSWmclGIZqNJyfMHFD\nMy6xzPRNNfWe5aumGTJsuIzuXfDRcdO7KmH1d2/5brkvWpxp6svVrYPvcoXjl4VN\nQR2mv5Di4KHfiiwvP3eeewjUZj+uREGqX2fcbJPHTPy32Kpb0H8Uy09BklhjC7QP\ngRAGexPhU1oBL/CoOwbHKcQ6dxs/y1SxzI8gXEtec4z62CroI13iT7U0UjSqFBE4\nKfrJombfz0d68781Z40ll+8my251ZNfbLBhQ3UHW0JnkBEQkE1aBorUoj2iakYvx\nA2qZh+8q2b8MwMb2YsQ0dlxKd6c4tN3lmMnO4bnd\n-----END CERTIFICATE-----"
+ }
+ ArtifactUpload:
+ title: Root Type for ArtifactUpload
+ description: |-
+ Artifact (SOAP UI project, Postman collection or OpenAPI Specification) to be imported by Microcks.
+ This structure represents a mime-multipart file upload (as specified here: https://swagger.io/docs/specification/describing-request-body/file-upload/)
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The artifact to upload
+ type: string
+ Counter:
+ title: Root Type for Counter
+ description: The root of the Counter type's schema.
+ type: object
+ properties:
+ counter:
+ format: int32
+ description: Number of items in a resource collection
+ type: integer
+ example: |-
+ {
+ "counter": 12
+ }
+ TestCaseReturnDTO:
+ required:
+ - operationName
+ properties:
+ operationName:
+ description: Name of related operation for this TestCase
+ type: string
+ TestReturn:
+ description: TestReturn is used for wrapping the return code of a test step
+ execution
+ required:
+ - code
+ - elapsedTime
+ properties:
+ code:
+ description: Return code for test (0 means Success, 1 means Failure)
+ type: integer
+ elapsedTime:
+ format: int64
+ description: Elapsed time in milliseconds
+ type: integer
+ message:
+ description: Error message if any
+ type: string
+ request:
+ $ref: '#/components/schemas/Request'
+ description: Request sent for this test
+ response:
+ $ref: '#/components/schemas/Response'
+ description: Response returned for this test
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Event Message received for this test
+ Request:
+ description: A mock invocation or test request
+ required:
+ - name
+ - operationId
+ properties:
+ id:
+ description: Unique identifier of Request
+ type: string
+ name:
+ description: Unique distinct name of this Request
+ type: string
+ content:
+ description: Body content for this request
+ type: string
+ operationId:
+ description: Identifier of Operation this Request is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Request is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Request
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Response:
+ description: A mock invocation or test response
+ required:
+ - operationId
+ - name
+ properties:
+ operationId:
+ description: Identifier of Operation this Response is associated to
+ type: string
+ content:
+ description: Body content of this Response
+ type: string
+ id:
+ description: Unique identifier of Response
+ type: string
+ name:
+ description: Unique distinct name of this Response
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Response is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Response
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Header:
+ description: Transport headers for both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this Header
+ type: array
+ items:
+ type: string
+ TestStepResult:
+ description: TestStepResult is an entity embedded within TestCaseResult. They
+ are created for each request associated with an operation / action of a microservice.
+ required:
+ - success
+ - elapsedTome
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test step beginning
+ type: number
+ requestName:
+ description: Name of request this test step is bound to
+ type: string
+ message:
+ description: Error message that may be associated to this test step
+ type: string
+ eventMessageName:
+ description: Name of event this test step is bound to
+ type: string
+ KeycloakConfig:
+ description: Representation of Keycloak / SSO configuration used by Microcks
+ server
+ required:
+ - realm
+ - auth-server-url
+ - public-client
+ - ssl-required
+ - resource
+ type: object
+ properties:
+ realm:
+ description: Authentication realm name
+ type: string
+ auth-server-url:
+ description: SSO Server authentication url
+ type: string
+ public-client:
+ description: Name of public-client that can be used for requesting OAuth
+ token
+ type: string
+ ssl-required:
+ description: SSL certificates requirements
+ enum:
+ - none
+ - external
+ resource:
+ description: Name of Keycloak resource/application used on client side
+ type: string
+ RequestResponsePair:
+ description: Request associated with corresponding Response
+ type: object
+ allOf:
+ - required:
+ - request
+ - response
+ type: object
+ properties:
+ request:
+ $ref: '#/components/schemas/Request'
+ description: The request part of the pair
+ response:
+ $ref: '#/components/schemas/Response'
+ description: The Response part of the pair
+ - $ref: '#/components/schemas/AbstractExchange'
+ OperationOverrideDTO:
+ description: Data Transfer object for grouping the mutable properties of an
+ Operation
+ type: object
+ properties:
+ dispatcher:
+ description: Type of dispatcher to apply for this operation
+ type: string
+ dispatcherRules:
+ description: Rules of dispatcher for this operation
+ type: string
+ defaultDelay:
+ description: Default delay in milliseconds to apply to mock responses on
+ this operation
+ type: integer
+ parameterConstraints:
+ description: Constraints that may apply to incoming parameters on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ ParameterConstraint:
+ description: Companion object for Operation that may be used to express constraints
+ on request parameters
+ required:
+ - name
+ type: object
+ properties:
+ name:
+ description: Parameter name
+ type: string
+ required:
+ description: Whether it's a required constraint
+ type: boolean
+ recopy:
+ description: Whether it's a recopy constraint
+ type: boolean
+ mustMatchRegexp:
+ description: Whether it's a regular expression matching constraint
+ type: string
+ in:
+ description: Parameter location
+ enum:
+ - path
+ - query
+ - header
+ type: string
+ Metadata:
+ description: Commodity object for holding metadata on any entity. This object
+ is inspired by Kubernetes metadata.
+ required:
+ - createdOn
+ - lastUpdate
+ type: object
+ properties:
+ createdOn:
+ description: Creation date of attached object
+ type: integer
+ lastUpdate:
+ description: Last update of attached object
+ type: integer
+ annotations:
+ description: Annotations of attached object
+ type: object
+ additionalProperties:
+ type: string
+ labels:
+ description: Labels put on attached object
+ type: object
+ additionalProperties:
+ type: string
+ Binding:
+ description: Protocol binding details for asynchronous operations
+ required:
+ - type
+ - destinationName
+ type: object
+ properties:
+ type:
+ description: Protocol binding identifier
+ enum:
+ - KAFKA
+ type: string
+ keyType:
+ description: Type of key for Kafka messages
+ type: string
+ destinationType:
+ description: Type of destination for asynchronous messages of this operation
+ type: string
+ destinationName:
+ description: Name of destination for asynchronous messages of this operation
+ type: string
+ Operation:
+ description: An Operation of a Service or API
+ required:
+ - name
+ - method
+ type: object
+ properties:
+ name:
+ description: Unique name of this Operation within Service scope
+ type: string
+ method:
+ description: Represents transport method
+ type: string
+ inputName:
+ description: Name of input parameters in case of Xml based Service
+ type: string
+ outputName:
+ description: Name of output parameters in case of Xml based Service
+ type: string
+ dispatcher:
+ description: Dispatcher strategy used for mocks
+ type: string
+ dispatcherRules:
+ description: DispactherRules used for mocks
+ type: string
+ defaultDelay:
+ description: Default response time delay for mocks
+ type: number
+ resourcePaths:
+ description: Paths the mocks endpoints are mapped on
+ type: array
+ items:
+ type: string
+ parameterContraints:
+ description: Contraints that may apply to mock invocatino on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ bindings:
+ description: Map of protocol binding details for this operation
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Binding'
+ LabelsMap:
+ description: A map which keys are already used labels keys and values are already
+ used values for this key
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/StringArray'
+ type: object
+ UnidirectionalEvent:
+ description: Representation of an unidirectional exchange as an event message
+ type: object
+ allOf:
+ - required:
+ - eventMessage
+ type: object
+ properties:
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Asynchronous message for this unidirectional event
+ - $ref: '#/components/schemas/AbstractExchange'
+ EventMessage:
+ description: ""
+ required:
+ - id
+ - mediaType
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this message
+ type: string
+ mediaType:
+ description: Content type of message
+ type: string
+ name:
+ description: Unique distinct name of this message
+ type: string
+ content:
+ description: Body content for this message
+ type: string
+ operationId:
+ description: Identifier of Operation this message is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this message is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this message
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ StringArray:
+ description: A simple array of String
+ type: array
+ items:
+ type: string
+ MessageArray:
+ description: Array of Message for Service operations
+ type: array
+ items:
+ $ref: '#/components/schemas/Exchange'
+ Exchange:
+ oneOf:
+ - $ref: '#/components/schemas/RequestResponsePair'
+ - $ref: '#/components/schemas/UnidirectionalEvent'
+ discriminator:
+ propertyName: type
+ mapping:
+ reqRespPair: '#/components/schemas/RequestResponsePair'
+ unidirEvent: '#/components/schemas/UnidirectionalEvent'
+ AbstractExchange:
+ description: Abstract bean representing a Service or API Exchange.
+ required:
+ - type
+ type: object
+ properties:
+ type:
+ description: Discriminant type for identifying kind of exchange
+ enum:
+ - reqRespPair
+ - unidirEvent
+ type: string
+ ServiceView:
+ description: Aggregate bean for grouping a Service an its messages pairs
+ required:
+ - service
+ - messagesMap
+ type: object
+ properties:
+ service:
+ $ref: '#/components/schemas/Service'
+ description: Wrapped service description
+ messagesMap:
+ description: Map of messages for this Service. Keys are operation name,
+ values are array of messages for this operation
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MessageArray'
+ TestRunnerType:
+ description: Type of test strategy (different strategies are implemented by
+ different runners)
+ type: array
+ items:
+ enum:
+ - HTTP
+ - SOAP_HTTP
+ - SOAP_UI
+ - POSTMAN
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SCHEMA
+ type: string
+ OperationHeaders:
+ description: Specification of additional headers for a Service/API operations.
+ Keys are operation name or "globals" (if header applies to all), values are
+ Header objects.
+ type: object
+ additionalProperties:
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ TestResult:
+ description: Represents the result of a Service or API test run by Microcks.
+ Tests are related to a service and made of multiple test cases corresponding
+ to each operations / actions composing service. Tests are run against a specific
+ endpoint named testedEndpoint. It holds global markers telling if test still
+ ran, is a success, how many times is has taken and so on ...
+ required:
+ - id
+ - version
+ - testNumber
+ - testedEndpoint
+ - serviceId
+ - success
+ - inProgress
+ - runnerType
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ version:
+ description: Revision number of this test
+ type: number
+ testNumber:
+ description: Incremental number for tracking number of tests of a service
+ type: number
+ testedEndpoint:
+ description: Endpoint used during test
+ type: string
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ elapsedTime:
+ description: Elapsed time in milliseconds since test beginning
+ type: number
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ inProgress:
+ description: Flag telling is test is still in progress
+ type: boolean
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ testCaseResults:
+ description: TestCase results associated to this test
+ type: array
+ items:
+ $ref: '#/components/schemas/TestCaseResult'
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: The referrence of the Secret used for connecting to test endpoint
+ operationHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ responses:
+ ServiceResponse:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/Service'
+ - $ref: '#/components/schemas/ServiceView'
+ description: ""
+ securitySchemes:
+ jwt-bearer:
+ flows:
+ clientCredentials:
+ tokenUrl: https://keycloak.example.com/auth/realms/microcks/protocol/openid-connect/token
+ refreshUrl: https://keycloak.example.com/auth/realms/microcks/protocol/openid-connect/token
+ scopes:
+ user: ""
+ manager: ""
+ admin: ""
+ type: oauth2
+ description: JWT Bearer acquired using OAuth 2 Authentication flow or Direct
+ Access Grant
+security:
+- jwt-bearer: []
+tags:
+- name: mock
+ description: Operations related to API and Services mocks
+- name: test
+ description: Operations related to API and Services tests
+- name: job
+ description: Operations related to Jobs for discovering mocks and tests
+- name: config
+ description: Operations related to configuration
diff --git a/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.10.yaml b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.10.yaml
new file mode 100644
index 000000000..b38f40ad3
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.10.yaml
@@ -0,0 +1,2296 @@
+---
+openapi: 3.0.2
+info:
+ title: Microcks API v1.10
+ version: 1.10.1
+ description: "API offered by Microcks, the Kubernetes native tool for API and microservices\
+ \ mocking and testing (microcks.io)"
+ contact:
+ name: Laurent Broudoux
+ url: https://github.com/microcks
+ email: laurent@microcks.io
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0
+ x-logo:
+ backgroundColor: '#ffffff'
+ url: https://microcks.io/images/microcks-logo-blue.png
+servers:
+- url: http://microcks.example.com/api
+ description: ""
+paths:
+ /services:
+ summary: This path operations deal with Services
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: page
+ description: Page of Services to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of Services to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServices
+ summary: Get Services and APIs
+ /tests:
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestRequest'
+ required: true
+ tags:
+ - test
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Created TestResult (empty shell cause tests are executed asynchronously)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateTest
+ summary: Create a new Test
+ /services/count:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Services in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServicesCounter
+ summary: Get the Services counter
+ /jobs:
+ summary: This path operations deal with ImportJobs
+ get:
+ tags:
+ - job
+ parameters:
+ - name: page
+ description: Page of ImportJobs to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of ImportJobs to include in a
+ response (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ - name: name
+ description: Name like criterion for query
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ImportJob'
+ description: List of found ImportJobs
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobs
+ summary: Get ImportJobs
+ description: Retrieve a list of ImportJobs
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Created ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateImportJob
+ summary: Create ImportJob
+ description: Create a new ImportJob
+ /jobs/{id}:
+ summary: This path or subpaths operations deal with specific ImportJob having
+ given id
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Found ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJob
+ summary: Get ImportJob
+ description: Retrieve an ImportJob using its identifier
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Updated ImportJob
+ operationId: UpdateImportJob
+ summary: Update ImportJob
+ description: Update an ImportJob
+ delete:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: ImportJob deleted
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: DeleteImportJob
+ summary: Delete ImportJob
+ description: Delete an ImportJob
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: messages
+ description: Whether to include details on services messages into result.
+ Default is false
+ schema:
+ type: boolean
+ in: query
+ responses:
+ "200":
+ $ref: '#/components/responses/ServiceResponse'
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetService
+ summary: Get Service
+ delete:
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: DeleteService
+ summary: Delete Service
+ description: Delete a Service
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /artifact/upload:
+ summary: Deals with artifacts to be imported by Microcks.
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/ArtifactUpload'
+ examples:
+ Artifact upload:
+ value: |
+ POST /api/artifact/upload HTTP/1.1
+ Host: microcks
+ User-Agent: curl/7.54.0
+ Accept: */*
+ Authorization: Bearer
+ Content-Length: 2743
+ Expect: 100-continue
+ Content-Type: multipart/form-data; boundary=------------------------8af8cbb56dd4bde0
+
+ --------------------------8af8cbb56dd4bde0
+ Content-Disposition: form-data; name="file"; filename="github.json"
+ Content-Type: application/octet-stream
+
+ THE ARTIFACT HERE
+
+ --------------------------8af8cbb56dd4bde0--
+ required: true
+ tags:
+ - job
+ parameters:
+ - name: mainArtifact
+ description: Flag telling if this should be considered as primary or secondary
+ artifact. Default to 'true'
+ schema:
+ type: boolean
+ in: query
+ required: true
+ responses:
+ "201":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact was imported and Service found
+ "204":
+ description: No file attribute found in uploaded data
+ "400":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact content is invalid and not understood
+ security:
+ - jwt-bearer:
+ - manager
+ operationId: uploadArtifact
+ summary: Upload an artifact
+ description: Uploads an artifact to be imported by Microcks.
+ /jobs/count:
+ summary: Count ImportJobs
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of ImportJobs in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobCounter
+ summary: Get the ImportJobs counter
+ /secrets:
+ summary: This path operations deal with Secrets
+ get:
+ tags:
+ - config
+ parameters:
+ - name: page
+ description: Page of Secrets to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ required: false
+ - name: size
+ description: Size of a page. Maximum number of Secrets to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ required: false
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Secret'
+ description: List of found Secrets
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecrets
+ summary: Get Secrets
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ tags:
+ - config
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Created Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: CreateSecret
+ summary: Create a new Secret
+ /secrets/{id}:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Found Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetSecret
+ summary: Get Secret
+ description: Retrieve a Secret
+ put:
+ requestBody:
+ description: The Secret to update
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ required: true
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Updated Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: UpdateSecret
+ summary: Update Secret
+ description: Update a Secret
+ delete:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Secret has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: DeleteSecret
+ summary: Delete Secret
+ description: Delete a Secret
+ parameters:
+ - name: id
+ description: Unique identifier of Secret to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /secrets/count:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Secrets in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecretsCounter
+ summary: Get the Secrets counter
+ /tests/service/{serviceId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResult'
+ description: List of TestResults for the Service having the requested id
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByService
+ summary: Get TestResults by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/service/{serviceId}/count:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of TestResults for this Service in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByServiceCounter
+ summary: Get the TestResults for Service counter
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Requested TestResult
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResult
+ summary: Get TestResult
+ description: ""
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/messages/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RequestResponsePair'
+ description: List of request and response messages for this TestCase
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetMessagesByTestCase
+ summary: Get messages for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/testCaseResult:
+ post:
+ requestBody:
+ description: TestCase return wrapper object
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseReturnDTO'
+ required: true
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseResult'
+ description: TestCaseResult is reported
+ operationId: ReportTestCaseResult
+ summary: Report and create a new TestCaseResult
+ description: Report a TestCaseResult (typically used by a Test runner)
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /keycloak/config:
+ summary: Keycloak Authentification configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KeycloakConfig'
+ description: Get current configuration
+ operationId: GetKeycloakConfig
+ summary: Get authentification configuration
+ /services/{id}/operation:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OperationOverrideDTO'
+ required: true
+ tags:
+ - mock
+ parameters:
+ - name: operationName
+ description: Name of operation to update
+ schema:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ description: Operation has been updated
+ "500":
+ description: Operation cannot be updated
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: OverrideServiceOperation
+ summary: Override Service Operation
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}/metadata:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Metadata'
+ required: true
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service metadata has been updated
+ "500":
+ description: Update of metadata failed
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: UpdateServiceMetadata
+ summary: Update Service Metadata
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/search:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: queryMap
+ description: Map of criterion. Key can be simply 'name' with value as the
+ searched string. You can also search by label using keys like 'labels.x'
+ where 'x' is the label and value the label value
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services (filtered according search criteria)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: SearchServices
+ summary: Search for Services and APIs
+ /tests/{id}/events/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/UnidirectionalEvent'
+ description: List of event messages for this TestCase
+ operationId: GetEventsByTestCase
+ summary: Get events for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/{name}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Resource'
+ description: Retrieve the resource having this name
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResource
+ summary: Get Resource
+ parameters:
+ - name: name
+ description: Unique name/business identifier of the Service or API resource
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/service/{serviceId}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Resource'
+ description: List the resources attached to a Service or API
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResourcesByService
+ summary: Get Resources by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of the Service or API the resources are attached
+ to
+ schema:
+ type: string
+ in: path
+ required: true
+ /features/config:
+ summary: Optional features configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: Get features configuration
+ operationId: GetFeaturesConfig
+ summary: Get features configuration
+ /import:
+ summary: Deals with repository snapshot to import in Microcks
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/SnapshotUpload'
+ required: true
+ tags:
+ - mock
+ responses:
+ "201":
+ description: Snasphot has been correctly imported
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: importSnapshot
+ summary: Import a snapshot
+ description: Import a repository snapshot previsouly exported into Microcks
+ /export:
+ summary: Deals with repository snapshot to import from Microcks
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: serviceIds
+ description: List of service identifiers to export
+ schema:
+ type: array
+ items:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ headers:
+ Content-Disposition:
+ schema:
+ type: string
+ examples:
+ filename:
+ value: attachment; filename=microcks-repository.json
+ content:
+ application/json:
+ schema:
+ format: binary
+ type: string
+ description: Snapshot file representing the export of requested services
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: exportSnapshot
+ summary: Export a snapshot
+ description: Export a repostiory snapshot with requested services
+ /metrics/invocations/global:
+ summary: Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Aggregated invocation statistics for specified day
+ operationId: GetAggregatedInvocationsStats
+ summary: Get aggregated invocation statistics for a day
+ /metrics/conformance/aggregate:
+ summary: Aggregation of Test conformance metrics
+ get:
+ tags:
+ - metrics
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/WeightedMetricValue'
+ description: Get aggregated coverage metric value
+ operationId: GetConformanceMetricsAggregation
+ summary: Get aggregation of conformance metrics
+ /metrics/conformance/service/{serviceId}:
+ summary: Test Conformance metrics on API and Services
+ get:
+ tags:
+ - metrics
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestConformanceMetric'
+ description: Test coverage metric for Service
+ operationId: GetServiceTestConformanceMetric
+ summary: Get conformance metrics for a Service
+ parameters:
+ - name: serviceId
+ description: Unique Services identifier this metrics are related to
+ schema:
+ type: string
+ in: path
+ required: true
+ /metrics/invocations/top:
+ summary: Top Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ - name: limit
+ description: The number of top invoked mocks to return
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Top invocations for a defined day
+ operationId: GetTopIvnocationsStatsByDay
+ summary: Get top invocation statistics for a day
+ /metrics/invocations/{serviceName}/{serviceVersion}:
+ summary: Invocation Statistics for API and Services
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Invocation statistics for service for specified day
+ operationId: GetInvocationStatsByService
+ summary: Get invocation statistics for Service
+ parameters:
+ - name: serviceName
+ description: Name of service to get statistics for
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: serviceVersion
+ description: Version of service to get statistics for
+ schema:
+ type: string
+ in: path
+ required: true
+ /metrics/invocations/global/latest:
+ summary: Latest Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: limit
+ description: Number of days to get back in time. Default is 20.
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CounterMap'
+ description: A map where keys are day (formatted using yyyyMMdd pattern)
+ and values are counter of invocations on this day
+ operationId: GetLatestAggregatedInvocationsStats
+ summary: Get aggregated invocations statistics for latest days
+ /metrics/tests/latest:
+ summary: Lastest Test results across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: limit
+ description: Number of days to consider for test results to return. Default
+ is 7 (one week)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResultSummary'
+ description: Test results summary for specified last days.
+ operationId: GetLatestTestResults
+ summary: Get latest tests results
+ /jobs/{id}/start:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Started ImportJob
+ security:
+ - jwt-bearer:
+ - manager
+ - admin
+ operationId: StartImportJob
+ summary: Start an ImportJob
+ description: Starting an ImportJob forces it to immediatly import mock definitions
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/stop:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Stopped ImportJob
+ security:
+ - jwt-bearer:
+ - manager
+ - admin
+ operationId: StopImportJob
+ summary: Stop an ImportJob
+ description: "Stopping an ImportJob desactivate it, so that it won't execute\
+ \ at next schedule"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/activate:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: ImportJob is activated
+ security:
+ - jwt-bearer:
+ - manager
+ - admin
+ operationId: ActivateImportJob
+ summary: Activate an ImportJob
+ description: "Make an ImportJob active, so that it is executed"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/labels:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LabelsMap'
+ description: "Already used labels: keys are label Keys, values are array\
+ \ of label Values"
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServicesLabels
+ summary: Get the already used labels for Services
+ /artifact/download:
+ summary: Deals with artifacts to be downloaded and imported by Microcks.
+ post:
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ $ref: '#/components/schemas/ArtifactDownload'
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact was imported and Service found
+ "204":
+ description: No url attribute found in download data
+ "400":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact content is invalid and not understood
+ security:
+ - jwt-bearer:
+ - manager
+ operationId: downloadArtifact
+ summary: Download an artifact
+ description: Ask Microcks to download an artifact and import it
+ /secrets/search:
+ get:
+ tags:
+ - config
+ parameters:
+ - name: name
+ description: Search using this name-like criterion
+ schema:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Secret'
+ description: List of found Secrets (filtered according search criteria)
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: SearchSecrets
+ summary: Search for Secrets
+components:
+ schemas:
+ TestCaseResult:
+ description: Companion objects for TestResult. Each TestCaseResult correspond
+ to a particuliar service operation / action reference by the operationName
+ field. TestCaseResults owns a collection of TestStepResults (one for every
+ request associated to service operation / action).
+ required:
+ - success
+ - elapsedTime
+ - operationName
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test case beginning
+ type: number
+ operationName:
+ description: Name of operation this test case is bound to
+ type: string
+ testStepResults:
+ description: Test steps associated to this test case
+ type: array
+ items:
+ $ref: '#/components/schemas/TestStepResult'
+ ServiceRef:
+ description: Lightweight reference of an existing Service
+ required:
+ - serviceId
+ - name
+ - version
+ properties:
+ serviceId:
+ description: Unique reference of a Service
+ type: string
+ name:
+ description: The Service name
+ type: string
+ version:
+ description: The Service version
+ type: string
+ SecretRef:
+ description: Lightweight reference for an existing Secret
+ required:
+ - secretId
+ - name
+ properties:
+ secretId:
+ description: Unique identifier or referenced Secret
+ type: string
+ name:
+ description: Distinct name of the referenced Secret
+ type: string
+ example: |-
+ {
+ "secretId": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal"
+ }
+ Secret:
+ description: A Secret allows grouping informations on how to access a restricted
+ resource such as a repsoitory URL. Secrets are typically used by ImpoortJobs.
+ required:
+ - name
+ - description
+ properties:
+ id:
+ description: Unique identifier of Secret
+ type: string
+ name:
+ description: Unique distinct name of Secret
+ type: string
+ username:
+ type: string
+ password:
+ type: string
+ token:
+ type: string
+ tokenHeader:
+ type: string
+ caCertPem:
+ type: string
+ description:
+ description: Description of this Secret
+ type: string
+ example: |-
+ {
+ "id": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal",
+ "description": "Gogs internal corporate repository",
+ "username": "team",
+ "password": "team",
+ "caCertPem": "-----BEGIN CERTIFICATE-----\nMIIC6jCCAdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu\nc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIwHhcNMTgwNzE4MTA0ODIyWhcNMjMwNzE3\nMTA0ODIzWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIw\nggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCyaP1jlpnm8WpfCSnUa8Qt\nhdUynOLLgElUtpWoW25wB9tO2ZmEj+fVsTyzEsW8+nfXXfRsBEzPm2ze9uEMTPTB\nAY0k7DbLZfjmF1lCckUvvh1rR/8hoPuXETjXUuOdtm7gRHTOxLQyH2Qi/q0DYJAn\nprKyRCLa35pRnykL6v4bHkqFnqDEho63i29XHhm2703moh4YCl1iYa2Rh6D44cjn\n8lBCq6o7zoZSmc/aBamRkQrfZYcolR8OUtDS4oEB0zMftmea2ycashsLEMB+Cq4r\n64NI2QM7qOxdTuXsDivHfLl7RTuWEOozGaJXoiPaGU/3d/KnY0gKJ2TC1KXt6Xjn\nAgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG\nSIb3DQEBCwUAA4IBAQCeUmxfUzw0VAFG6HvVYIsfvumiIvsSWmclGIZqNJyfMHFD\nMy6xzPRNNfWe5aumGTJsuIzuXfDRcdO7KmH1d2/5brkvWpxp6svVrYPvcoXjl4VN\nQR2mv5Di4KHfiiwvP3eeewjUZj+uREGqX2fcbJPHTPy32Kpb0H8Uy09BklhjC7QP\ngRAGexPhU1oBL/CoOwbHKcQ6dxs/y1SxzI8gXEtec4z62CroI13iT7U0UjSqFBE4\nKfrJombfz0d68781Z40ll+8my251ZNfbLBhQ3UHW0JnkBEQkE1aBorUoj2iakYvx\nA2qZh+8q2b8MwMb2YsQ0dlxKd6c4tN3lmMnO4bnd\n-----END CERTIFICATE-----"
+ }
+ TestCaseReturnDTO:
+ required:
+ - operationName
+ properties:
+ operationName:
+ description: Name of related operation for this TestCase
+ type: string
+ TestReturn:
+ description: TestReturn is used for wrapping the return code of a test step
+ execution
+ required:
+ - code
+ - elapsedTime
+ properties:
+ code:
+ description: "Return code for test (0 means Success, 1 means Failure)"
+ type: integer
+ elapsedTime:
+ format: int64
+ description: Elapsed time in milliseconds
+ type: integer
+ message:
+ description: Error message if any
+ type: string
+ request:
+ $ref: '#/components/schemas/Request'
+ description: Request sent for this test
+ response:
+ $ref: '#/components/schemas/Response'
+ description: Response returned for this test
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Event Message received for this test
+ Request:
+ description: A mock invocation or test request
+ required:
+ - name
+ - operationId
+ properties:
+ id:
+ description: Unique identifier of Request
+ type: string
+ name:
+ description: Unique distinct name of this Request
+ type: string
+ content:
+ description: Body content for this request
+ type: string
+ operationId:
+ description: Identifier of Operation this Request is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Request is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Request
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Response:
+ description: A mock invocation or test response
+ required:
+ - operationId
+ - name
+ properties:
+ operationId:
+ description: Identifier of Operation this Response is associated to
+ type: string
+ content:
+ description: Body content of this Response
+ type: string
+ id:
+ description: Unique identifier of Response
+ type: string
+ name:
+ description: Unique distinct name of this Response
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Response is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Response
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Header:
+ description: Transport headers for both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this Header
+ type: array
+ items:
+ type: string
+ TestStepResult:
+ description: TestStepResult is an entity embedded within TestCaseResult. They
+ are created for each request associated with an operation / action of a microservice.
+ required:
+ - success
+ - elapsedTome
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test step beginning
+ type: number
+ requestName:
+ description: Name of request this test step is bound to
+ type: string
+ message:
+ description: Error message that may be associated to this test step
+ type: string
+ eventMessageName:
+ description: Name of event this test step is bound to
+ type: string
+ KeycloakConfig:
+ description: Representation of Keycloak / SSO configuration used by Microcks
+ server
+ required:
+ - realm
+ - auth-server-url
+ - public-client
+ - ssl-required
+ - resource
+ - enabled
+ type: object
+ properties:
+ realm:
+ description: Authentication realm name
+ type: string
+ auth-server-url:
+ description: SSO Server authentication url
+ type: string
+ public-client:
+ description: Name of public-client that can be used for requesting OAuth
+ token
+ type: boolean
+ ssl-required:
+ description: SSL certificates requirements
+ enum:
+ - none
+ - external
+ resource:
+ description: Name of Keycloak resource/application used on client side
+ type: string
+ enabled:
+ description: Whether Keycloak authentification and usage is enabled
+ type: boolean
+ RequestResponsePair:
+ description: Request associated with corresponding Response
+ type: object
+ allOf:
+ - required:
+ - request
+ - response
+ type: object
+ properties:
+ request:
+ $ref: '#/components/schemas/Request'
+ description: The request part of the pair
+ response:
+ $ref: '#/components/schemas/Response'
+ description: The Response part of the pair
+ - $ref: '#/components/schemas/AbstractExchange'
+ OperationOverrideDTO:
+ description: Data Transfer object for grouping the mutable properties of an
+ Operation
+ type: object
+ properties:
+ dispatcher:
+ description: Type of dispatcher to apply for this operation
+ type: string
+ dispatcherRules:
+ description: Rules of dispatcher for this operation
+ type: string
+ defaultDelay:
+ description: Default delay in milliseconds to apply to mock responses on
+ this operation
+ type: integer
+ parameterConstraints:
+ description: Constraints that may apply to incoming parameters on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ ParameterConstraint:
+ description: Companion object for Operation that may be used to express constraints
+ on request parameters
+ required:
+ - name
+ type: object
+ properties:
+ name:
+ description: Parameter name
+ type: string
+ required:
+ description: Whether it's a required constraint
+ type: boolean
+ recopy:
+ description: Whether it's a recopy constraint
+ type: boolean
+ mustMatchRegexp:
+ description: Whether it's a regular expression matching constraint
+ type: string
+ in:
+ description: Parameter location
+ enum:
+ - path
+ - query
+ - header
+ type: string
+ Metadata:
+ description: Commodity object for holding metadata on any entity. This object
+ is inspired by Kubernetes metadata.
+ required:
+ - createdOn
+ - lastUpdate
+ type: object
+ properties:
+ createdOn:
+ description: Creation date of attached object
+ type: number
+ readOnly: true
+ lastUpdate:
+ description: Last update of attached object
+ type: number
+ readOnly: true
+ annotations:
+ description: Annotations of attached object
+ type: object
+ additionalProperties:
+ type: string
+ labels:
+ description: Labels put on attached object
+ type: object
+ additionalProperties:
+ type: string
+ LabelsMap:
+ description: A map which keys are already used labels keys and values are already
+ used values for this key
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/StringArray'
+ type: object
+ UnidirectionalEvent:
+ description: Representation of an unidirectional exchange as an event message
+ type: object
+ allOf:
+ - required:
+ - eventMessage
+ type: object
+ properties:
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Asynchronous message for this unidirectional event
+ - $ref: '#/components/schemas/AbstractExchange'
+ EventMessage:
+ description: ""
+ required:
+ - id
+ - mediaType
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this message
+ type: string
+ mediaType:
+ description: Content type of message
+ type: string
+ name:
+ description: Unique distinct name of this message
+ type: string
+ content:
+ description: Body content for this message
+ type: string
+ operationId:
+ description: Identifier of Operation this message is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this message is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this message
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ StringArray:
+ description: A simple array of String
+ type: array
+ items:
+ type: string
+ MessageArray:
+ description: Array of Message for Service operations
+ type: array
+ items:
+ $ref: '#/components/schemas/Exchange'
+ Exchange:
+ oneOf:
+ - $ref: '#/components/schemas/RequestResponsePair'
+ - $ref: '#/components/schemas/UnidirectionalEvent'
+ discriminator:
+ propertyName: type
+ mapping:
+ reqRespPair: '#/components/schemas/RequestResponsePair'
+ unidirEvent: '#/components/schemas/UnidirectionalEvent'
+ description: "Abstract representation of a Service or API exchange type (request/response,\
+ \ event based, ...)"
+ AbstractExchange:
+ description: Abstract bean representing a Service or API Exchange.
+ required:
+ - type
+ type: object
+ properties:
+ type:
+ description: Discriminant type for identifying kind of exchange
+ enum:
+ - reqRespPair
+ - unidirEvent
+ type: string
+ ServiceView:
+ description: Aggregate bean for grouping a Service an its messages pairs
+ required:
+ - service
+ - messagesMap
+ type: object
+ properties:
+ service:
+ $ref: '#/components/schemas/Service'
+ description: Wrapped service description
+ messagesMap:
+ description: "Map of messages for this Service. Keys are operation name,\
+ \ values are array of messages for this operation"
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MessageArray'
+ TestRequest:
+ description: Test request is a minimalist wrapper for requesting the launch
+ of a new test
+ required:
+ - serviceId
+ - testEndpoint
+ - runnerType
+ - timeout
+ properties:
+ serviceId:
+ description: Unique identifier of service to test
+ type: string
+ testEndpoint:
+ description: Endpoint to test for this service
+ type: string
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ filteredOperations:
+ description: A restriction on service operations to test
+ type: array
+ items:
+ type: string
+ secretName:
+ description: The name of Secret to use for connecting the test endpoint
+ type: string
+ oAuth2Context:
+ $ref: '#/components/schemas/OAuth2ClientContent'
+ description: An OAuth2 context to use for retrieving an access token prior
+ invoking the tested endpoint
+ operationsHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ Resource:
+ description: "Resource represents a Service or API artifacts such as specification,\
+ \ contract"
+ required:
+ - id
+ - name
+ - content
+ - type
+ - serviceId
+ type: object
+ properties:
+ id:
+ description: Uniquer identifier of this Service or API Resource
+ type: string
+ name:
+ description: Unique name/business identifier for this Service or API resource
+ type: string
+ content:
+ description: String content of this resource
+ type: string
+ type:
+ $ref: '#/components/schemas/ResourceType'
+ description: Type of this Service or API resource
+ serviceId:
+ description: Unique identifier of the Servoce or API this resource is attached
+ to
+ type: string
+ path:
+ description: Relative path of this resource regarding main resource
+ type: string
+ sourceArtifact:
+ description: Short name of the artifact this resource was extracted from
+ type: string
+ TestRunnerType:
+ description: Type of test strategy (different strategies are implemented by
+ different runners)
+ enum:
+ - HTTP
+ - SOAP_HTTP
+ - SOAP_UI
+ - POSTMAN
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SCHEMA
+ - GRPC_PROTOBUF
+ - GRAPHQL_SCHEMA
+ type: string
+ Operation:
+ description: An Operation of a Service or API
+ required:
+ - name
+ - method
+ type: object
+ properties:
+ name:
+ description: Unique name of this Operation within Service scope
+ type: string
+ method:
+ description: Represents transport method
+ type: string
+ inputName:
+ description: Name of input parameters in case of Xml based Service
+ type: string
+ outputName:
+ description: Name of output parameters in case of Xml based Service
+ type: string
+ dispatcher:
+ description: Dispatcher strategy used for mocks
+ type: string
+ dispatcherRules:
+ description: DispatcherRules used for mocks
+ type: string
+ defaultDelay:
+ description: Default response time delay for mocks
+ type: number
+ resourcePaths:
+ description: Paths the mocks endpoints are mapped on
+ type: array
+ items:
+ type: string
+ parameterContraints:
+ description: Contraints that may apply to mock invocatino on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ bindings:
+ description: Map of protocol binding details for this operation
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Binding'
+ ArtifactUpload:
+ description: |-
+ Artifact to be imported by Microcks.
+ This structure represents a mime-multipart file upload (as specified here: https://swagger.io/docs/specification/describing-request-body/file-upload/)
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The artifact to upload
+ type: string
+ Counter:
+ description: A simple Counter type.
+ type: object
+ properties:
+ counter:
+ format: int32
+ description: Number of items in a resource collection
+ type: integer
+ example: |-
+ {
+ "counter": 12
+ }
+ FeaturesConfig:
+ title: Root Type for FeaturesConfig
+ description: Representation of optional features configuration used by Microcks
+ server
+ type: object
+ properties:
+ repository-filter:
+ description: Repository filtering feature properties
+ type: object
+ properties:
+ label-label:
+ type: string
+ enabled:
+ type: string
+ label-list:
+ type: string
+ label-key:
+ type: string
+ microcks-hub:
+ description: Microcks Hub feature properties
+ type: object
+ properties:
+ allowed-roles:
+ type: string
+ endpoint:
+ type: string
+ enabled:
+ type: string
+ repository-tenancy:
+ description: Repository tenancy feature properties
+ type: object
+ properties:
+ enabled:
+ type: string
+ artifact-import-allowed-roles:
+ type: string
+ async-api:
+ description: Asynchronous feature properties
+ type: object
+ properties:
+ default-binding:
+ type: string
+ endpoint-MQTT:
+ type: string
+ endpoint-WS:
+ type: string
+ endpoint-KAFKA:
+ type: string
+ endpoint-AMQP:
+ type: string
+ endpoint-NATS:
+ type: string
+ endpoint-GOOGLEPUBSUB:
+ type: string
+ enabled:
+ type: string
+ frequencies:
+ type: string
+ additionalProperties: true
+ example:
+ repository-filter:
+ label-label: Domain
+ enabled: "true"
+ label-list: "domain,status"
+ label-key: domain
+ microcks-hub:
+ allowed-roles: "admin,manager,manager-any"
+ endpoint: https://hub.microcks.io/api
+ enabled: "true"
+ repository-tenancy:
+ enabled: "false"
+ artifact-import-allowed-roles: "admin,manager,manager-any"
+ async-api:
+ default-binding: KAFKA
+ endpoint-MQTT: my-mqtt-broker.apps.try.microcks.io
+ endpoint-WS: localhost:8081
+ endpoint-KAFKA: my-cluster-kafka-bootstrap.apps.try.microcks.io
+ enabled: "false"
+ frequencies: "3,10,30"
+ SnapshotUpload:
+ description: Upload of a repository snapshot file
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The repository snapshot file
+ type: string
+ HeaderDTO:
+ description: Data Transfert Object for headers of both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this header (comma separated strings)
+ type: string
+ OperationHeaders:
+ description: "Specification of additional headers for a Service/API operations.\
+ \ Keys are operation name or \"globals\" (if header applies to all), values\
+ \ are Header objects DTO."
+ type: object
+ additionalProperties:
+ type: array
+ items:
+ $ref: '#/components/schemas/HeaderDTO'
+ Service:
+ description: Represents a Service or API definition as registred into Microcks
+ repository
+ required:
+ - name
+ - version
+ - type
+ - sourceArtifact
+ properties:
+ id:
+ description: Unique identifier for this Service or API
+ type: string
+ name:
+ description: Distinct name for this Service or API (maybe shared among many
+ versions)
+ type: string
+ version:
+ description: Distinct version for a named Service or API
+ type: string
+ type:
+ description: Service or API Type
+ enum:
+ - REST
+ - SOAP_HTTP
+ - GENERIC_REST
+ - GENERIC_EVENT
+ - EVENT
+ - GRPC
+ - GRAPHQL
+ type: string
+ operations:
+ description: Set of Operations for Service or API
+ type: array
+ items:
+ $ref: '#/components/schemas/Operation'
+ xmlNS:
+ description: Associated Xml Namespace in case of Xml based Service
+ type: string
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of Service
+ sourceArtifact:
+ description: Short name of the main/primary artifact this service was created
+ from
+ type: string
+ Trend:
+ description: Evolution trend qualifier
+ enum:
+ - DOWN
+ - LOW_DOWN
+ - STABLE
+ - LOW_UP
+ - UP
+ type: string
+ WeightedMetricValue:
+ description: Value of a metric with an associated weight
+ required:
+ - name
+ - weight
+ - value
+ type: object
+ properties:
+ name:
+ description: Metric name or serie name
+ type: string
+ weight:
+ description: Weight of this metric value (typically a percentage)
+ type: integer
+ value:
+ description: The value of this metric
+ type: integer
+ DailyInvocationStatistic:
+ description: The daily statistic of a service mock invocations
+ required:
+ - id
+ - day
+ - serviceName
+ - serviceVersion
+ - dailyCount
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this statistic object
+ type: string
+ day:
+ description: The day (formatted as yyyyMMdd string) represented by this
+ statistic
+ type: string
+ serviceName:
+ description: The name of the service this statistic is related to
+ type: string
+ serviceVersion:
+ description: The version of the service this statistic is related to
+ type: string
+ dailyCount:
+ description: The number of service mock invocations on this day
+ type: number
+ hourlyCount:
+ description: The number of service mock invocations per hour of the day
+ (keys range from 0 to 23)
+ type: object
+ additionalProperties: true
+ minuteCount:
+ description: The number of service mock invocations per minute of the day
+ (keys range from 0 to 1439)
+ type: object
+ additionalProperties: true
+ TestConformanceMetric:
+ description: "Represents the test conformance metrics (current score, history\
+ \ and evolution trend) of a Service"
+ required:
+ - id
+ - serviceId
+ - currentScore
+ - maxPossibleScore
+ type: object
+ properties:
+ id:
+ description: Unique identifier of coverage metric
+ type: string
+ serviceId:
+ description: Unique identifier of the Service this metric is related to
+ type: string
+ aggregationLabelValue:
+ description: Value of the label used for metrics aggregation (if any)
+ type: string
+ maxPossibleScore:
+ format: double
+ description: Maximum conformance score that can be reached (depends on samples
+ expresiveness)
+ type: number
+ currentScore:
+ format: double
+ description: Current test conformance score for the related Service
+ type: number
+ lastUpdateDay:
+ description: The day of latest score update (in yyyyMMdd format)
+ type: string
+ latestTrend:
+ $ref: '#/components/schemas/Trend'
+ description: Evolution trend of currentScore
+ latestScores:
+ description: "History of latest scores (key is date with format yyyyMMdd,\
+ \ value is score as double)"
+ type: object
+ additionalProperties:
+ type: number
+ TestResultSummary:
+ description: 'Represents the summary result of a Service or API test run by
+ Microcks. '
+ required:
+ - id
+ - testDate
+ - serviceId
+ - success
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ testDate:
+ format: int64
+ description: Timestamp of creation date of this service
+ type: integer
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ TestResult:
+ description: "Represents the result of a Service or API test run by Microcks.\
+ \ Tests are related to a service and made of multiple test cases corresponding\
+ \ to each operations / actions composing service. Tests are run against a\
+ \ specific endpoint named testedEndpoint. It holds global markers telling\
+ \ if test still ran, is a success, how many times is has taken and so on ..."
+ required:
+ - id
+ - version
+ - testNumber
+ - testDate
+ - testedEndpoint
+ - serviceId
+ - success
+ - inProgress
+ - runnerType
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ version:
+ description: Revision number of this test
+ type: number
+ testNumber:
+ description: Incremental number for tracking number of tests of a service
+ type: number
+ testDate:
+ format: int64
+ description: Timestamp of creation date of this service
+ type: integer
+ testedEndpoint:
+ description: Endpoint used during test
+ type: string
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ elapsedTime:
+ description: Elapsed time in milliseconds since test beginning
+ type: number
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ inProgress:
+ description: Flag telling is test is still in progress
+ type: boolean
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ testCaseResults:
+ description: TestCase results associated to this test
+ type: array
+ items:
+ $ref: '#/components/schemas/TestCaseResult'
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: The referrence of the Secret used for connecting to test endpoint
+ operationHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ authorizedClient:
+ $ref: '#/components/schemas/OAuth2AuthorizedClient'
+ description: The OAuth2 authorized client that performed the test
+ Binding:
+ description: Protocol binding details for asynchronous operations
+ required:
+ - type
+ - destinationName
+ type: object
+ properties:
+ type:
+ description: Protocol binding identifier
+ enum:
+ - KAFKA
+ - MQTT
+ - WS
+ - AMQP
+ - NATS
+ - GOOGLEPUBSUB
+ type: string
+ keyType:
+ description: Type of key for Kafka messages
+ type: string
+ destinationType:
+ description: Type of destination for asynchronous messages of this operation
+ type: string
+ destinationName:
+ description: Name of destination for asynchronous messages of this operation
+ type: string
+ qoS:
+ description: Quality of Service attribute for MQTT binding
+ type: string
+ persistent:
+ description: Persistent attribute for MQTT binding
+ type: boolean
+ method:
+ description: HTTP method for WebSocket binding
+ type: string
+ ResourceType:
+ description: Types of managed resources for Services or APIs
+ enum:
+ - WSDL
+ - XSD
+ - JSON_SCHEMA
+ - OPEN_API_SPEC
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SPEC
+ - ASYNC_API_SCHEMA
+ - AVRO_SCHEMA
+ - PROTOBUF_SCHEMA
+ - PROTOBUF_DESCRIPTION
+ - GRAPHQL_SCHEMA
+ - POSTMAN_COLLECTION
+ type: string
+ CounterMap:
+ description: A generic map of counter
+ type: object
+ additionalProperties:
+ type: number
+ OAuth2ClientContent:
+ description: Represents a volatile OAuth2 client context usually associated
+ with a Test request
+ required:
+ - clientId
+ - clientSecret
+ - tokenUri
+ type: object
+ properties:
+ clientId:
+ description: Id for connecting to OAuth2 identity provider
+ type: string
+ clientSecret:
+ format: password
+ description: Secret for connecting to OAuth2 identity provider
+ type: string
+ tokenUri:
+ description: URI for retrieving an access token from OAuth2 identity provider
+ type: string
+ username:
+ description: Username in case you're using the Resource Owner Password flow
+ type: string
+ password:
+ description: User password in case you're suing the Resource Owner password
+ flow
+ type: string
+ refreshToken:
+ description: Refresh token in case you're using the Refresh Token rotation
+ flow
+ type: string
+ OAuth2GrantType:
+ description: Enumeration for the different supported grants/flows of OAuth2
+ enum:
+ - PASSWORD
+ - CLIENT_CREDENTIALS
+ - REFRESH_TOKEN
+ type: string
+ OAuth2AuthorizedClient:
+ description: OAuth2 authorized client that performed a test
+ required:
+ - grantType
+ - principalName
+ - tokenUri
+ type: object
+ properties:
+ grantType:
+ $ref: '#/components/schemas/OAuth2GrantType'
+ description: OAuth2 authorization flow/grant type applied
+ principalName:
+ description: Name of authorized principal (clientId or username in the case
+ of Password grant type)
+ type: string
+ tokenUri:
+ description: Identity Provider URI used for token retrieval
+ type: string
+ scopes:
+ description: Included scopes (separated using space)
+ type: string
+ ArtifactDownload:
+ description: Artifact Download specification to be imported by Microcks.
+ required:
+ - url
+ type: object
+ properties:
+ url:
+ description: The URL of remote artifact to download and import
+ type: string
+ mainArtifact:
+ description: Whether this remote artifact should be imported as main/primary
+ or secondary artifact. Default is true.
+ type: boolean
+ secretName:
+ description: The name of a secret that can be used to authenticated when
+ downloading remote artifact.
+ type: string
+ ImportJob:
+ description: An ImportJob allow defining a repository artifact to poll for discovering
+ Services and APIs mocks and tests
+ required:
+ - name
+ - repositoryUrl
+ properties:
+ id:
+ description: Unique identifier of ImportJob
+ type: string
+ name:
+ description: Unique distinct name of this ImportJob
+ type: string
+ repositoryUrl:
+ description: URL of mocks and tests repository artifact
+ type: string
+ repositoryDisableSSLValidation:
+ description: Whether to disable SSL certificate verification when checking
+ repository
+ type: boolean
+ frequency:
+ description: Reserved for future usage
+ type: string
+ createdDate:
+ format: int64
+ description: Creation timestamp for this ImportJob
+ type: integer
+ lastImportDate:
+ format: int64
+ description: Timestamp of the last import
+ type: integer
+ lastImportError:
+ description: Error message of last import (if any)
+ type: string
+ active:
+ description: Whether this ImportJob is active (ie. scheduled for execution)
+ type: boolean
+ etag:
+ description: Etag of repository URL during previous import. Is used for
+ not re-importing if no recent changes
+ type: string
+ serviceRefs:
+ description: References of Services discovered when checking repository
+ type: array
+ items:
+ $ref: '#/components/schemas/ServiceRef'
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of ImportJob
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: Reference of a Secret to used when checking repository
+ mainArtifact:
+ description: Flag telling if considered as primary or secondary artifact.
+ Default to `true`
+ type: boolean
+ responses:
+ ServiceResponse:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/Service'
+ - $ref: '#/components/schemas/ServiceView'
+ description: ""
+ securitySchemes:
+ jwt-bearer:
+ flows:
+ clientCredentials:
+ tokenUrl: https://keycloak.example.com/realms/microcks/protocol/openid-connect/token
+ refreshUrl: https://keycloak.example.com/realms/microcks/protocol/openid-connect/token
+ scopes:
+ user: Simple authenticated user
+ manager: Services & APIs content manager
+ admin: Administrator of the Microcks instance
+ type: oauth2
+ description: JWT Bearer acquired using OAuth 2 Authentication flow or Direct
+ Access Grant
+security:
+- jwt-bearer: []
+tags:
+- name: mock
+ description: Operations related to API and Services mocks
+- name: test
+ description: Operations related to API and Services tests
+- name: job
+ description: Operations related to Jobs for discovering mocks and tests
+- name: config
+ description: Operations related to configuration
+- name: metrics
+ description: Operations related to metrics
diff --git a/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.11.yaml b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.11.yaml
new file mode 100644
index 000000000..bdc376c2b
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.11.yaml
@@ -0,0 +1,2301 @@
+---
+openapi: 3.0.2
+info:
+ title: Microcks API v1.11
+ version: 1.11.0
+ description: "API offered by Microcks, the Kubernetes native tool for API and microservices\
+ \ mocking and testing (microcks.io)"
+ contact:
+ name: Laurent Broudoux
+ url: https://github.com/microcks
+ email: laurent@microcks.io
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0
+ x-logo:
+ backgroundColor: '#ffffff'
+ url: https://microcks.io/images/microcks-logo-blue.png
+servers:
+ - url: http://microcks.example.com/api
+ description: ""
+paths:
+ /services:
+ summary: This path operations deal with Services
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: page
+ description: Page of Services to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of Services to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServices
+ summary: Get Services and APIs
+ /tests:
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestRequest'
+ required: true
+ tags:
+ - test
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Created TestResult (empty shell cause tests are executed asynchronously)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateTest
+ summary: Create a new Test
+ /services/count:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Services in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServicesCounter
+ summary: Get the Services counter
+ /jobs:
+ summary: This path operations deal with ImportJobs
+ get:
+ tags:
+ - job
+ parameters:
+ - name: page
+ description: Page of ImportJobs to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of ImportJobs to include in a
+ response (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ - name: name
+ description: Name like criterion for query
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ImportJob'
+ description: List of found ImportJobs
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobs
+ summary: Get ImportJobs
+ description: Retrieve a list of ImportJobs
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Created ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateImportJob
+ summary: Create ImportJob
+ description: Create a new ImportJob
+ /jobs/{id}:
+ summary: This path or subpaths operations deal with specific ImportJob having
+ given id
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Found ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJob
+ summary: Get ImportJob
+ description: Retrieve an ImportJob using its identifier
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Updated ImportJob
+ operationId: UpdateImportJob
+ summary: Update ImportJob
+ description: Update an ImportJob
+ delete:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: ImportJob deleted
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: DeleteImportJob
+ summary: Delete ImportJob
+ description: Delete an ImportJob
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: messages
+ description: Whether to include details on services messages into result.
+ Default is false
+ schema:
+ type: boolean
+ in: query
+ responses:
+ "200":
+ $ref: '#/components/responses/ServiceResponse'
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetService
+ summary: Get Service
+ delete:
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: DeleteService
+ summary: Delete Service
+ description: Delete a Service
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/count:
+ summary: Count ImportJobs
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of ImportJobs in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobCounter
+ summary: Get the ImportJobs counter
+ /secrets:
+ summary: This path operations deal with Secrets
+ get:
+ tags:
+ - config
+ parameters:
+ - name: page
+ description: Page of Secrets to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ required: false
+ - name: size
+ description: Size of a page. Maximum number of Secrets to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ required: false
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Secret'
+ description: List of found Secrets
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecrets
+ summary: Get Secrets
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ tags:
+ - config
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Created Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: CreateSecret
+ summary: Create a new Secret
+ /secrets/{id}:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Found Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetSecret
+ summary: Get Secret
+ description: Retrieve a Secret
+ put:
+ requestBody:
+ description: The Secret to update
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ required: true
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Updated Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: UpdateSecret
+ summary: Update Secret
+ description: Update a Secret
+ delete:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Secret has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: DeleteSecret
+ summary: Delete Secret
+ description: Delete a Secret
+ parameters:
+ - name: id
+ description: Unique identifier of Secret to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /secrets/count:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Secrets in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecretsCounter
+ summary: Get the Secrets counter
+ /tests/service/{serviceId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResult'
+ description: List of TestResults for the Service having the requested id
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByService
+ summary: Get TestResults by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/service/{serviceId}/count:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of TestResults for this Service in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByServiceCounter
+ summary: Get the TestResults for Service counter
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Requested TestResult
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResult
+ summary: Get TestResult
+ description: ""
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/messages/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RequestResponsePair'
+ description: List of request and response messages for this TestCase
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetMessagesByTestCase
+ summary: Get messages for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/testCaseResult:
+ post:
+ requestBody:
+ description: TestCase return wrapper object
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseReturnDTO'
+ required: true
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseResult'
+ description: TestCaseResult is reported
+ operationId: ReportTestCaseResult
+ summary: Report and create a new TestCaseResult
+ description: Report a TestCaseResult (typically used by a Test runner)
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /keycloak/config:
+ summary: Keycloak Authentification configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KeycloakConfig'
+ description: Get current configuration
+ operationId: GetKeycloakConfig
+ summary: Get authentification configuration
+ /services/{id}/operation:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OperationOverrideDTO'
+ required: true
+ tags:
+ - mock
+ parameters:
+ - name: operationName
+ description: Name of operation to update
+ schema:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ description: Operation has been updated
+ "500":
+ description: Operation cannot be updated
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: OverrideServiceOperation
+ summary: Override Service Operation
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}/metadata:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Metadata'
+ required: true
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service metadata has been updated
+ "500":
+ description: Update of metadata failed
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: UpdateServiceMetadata
+ summary: Update Service Metadata
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/search:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: queryMap
+ description: Map of criterion. Key can be simply 'name' with value as the
+ searched string. You can also search by label using keys like 'labels.x'
+ where 'x' is the label and value the label value
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services (filtered according search criteria)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: SearchServices
+ summary: Search for Services and APIs
+ /tests/{id}/events/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/UnidirectionalEvent'
+ description: List of event messages for this TestCase
+ operationId: GetEventsByTestCase
+ summary: Get events for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/{name}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Resource'
+ description: Retrieve the resource having this name
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResource
+ summary: Get Resource
+ parameters:
+ - name: name
+ description: Unique name/business identifier of the Service or API resource
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/service/{serviceId}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Resource'
+ description: List the resources attached to a Service or API
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResourcesByService
+ summary: Get Resources by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of the Service or API the resources are attached
+ to
+ schema:
+ type: string
+ in: path
+ required: true
+ /features/config:
+ summary: Optional features configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: Get features configuration
+ operationId: GetFeaturesConfig
+ summary: Get features configuration
+ /import:
+ summary: Deals with repository snapshot to import in Microcks
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/SnapshotUpload'
+ required: true
+ tags:
+ - mock
+ responses:
+ "201":
+ description: Snasphot has been correctly imported
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: importSnapshot
+ summary: Import a snapshot
+ description: Import a repository snapshot previsouly exported into Microcks
+ /export:
+ summary: Deals with repository snapshot to import from Microcks
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: serviceIds
+ description: List of service identifiers to export
+ schema:
+ type: array
+ items:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ headers:
+ Content-Disposition:
+ schema:
+ type: string
+ examples:
+ filename:
+ value: attachment; filename=microcks-repository.json
+ content:
+ application/json:
+ schema:
+ format: binary
+ type: string
+ description: Snapshot file representing the export of requested services
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: exportSnapshot
+ summary: Export a snapshot
+ description: Export a repostiory snapshot with requested services
+ /metrics/invocations/global:
+ summary: Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Aggregated invocation statistics for specified day
+ operationId: GetAggregatedInvocationsStats
+ summary: Get aggregated invocation statistics for a day
+ /metrics/conformance/aggregate:
+ summary: Aggregation of Test conformance metrics
+ get:
+ tags:
+ - metrics
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/WeightedMetricValue'
+ description: Get aggregated coverage metric value
+ operationId: GetConformanceMetricsAggregation
+ summary: Get aggregation of conformance metrics
+ /metrics/conformance/service/{serviceId}:
+ summary: Test Conformance metrics on API and Services
+ get:
+ tags:
+ - metrics
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestConformanceMetric'
+ description: Test coverage metric for Service
+ operationId: GetServiceTestConformanceMetric
+ summary: Get conformance metrics for a Service
+ parameters:
+ - name: serviceId
+ description: Unique Services identifier this metrics are related to
+ schema:
+ type: string
+ in: path
+ required: true
+ /metrics/invocations/top:
+ summary: Top Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ - name: limit
+ description: The number of top invoked mocks to return
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Top invocations for a defined day
+ operationId: GetTopIvnocationsStatsByDay
+ summary: Get top invocation statistics for a day
+ /metrics/invocations/{serviceName}/{serviceVersion}:
+ summary: Invocation Statistics for API and Services
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Invocation statistics for service for specified day
+ operationId: GetInvocationStatsByService
+ summary: Get invocation statistics for Service
+ parameters:
+ - name: serviceName
+ description: Name of service to get statistics for
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: serviceVersion
+ description: Version of service to get statistics for
+ schema:
+ type: string
+ in: path
+ required: true
+ /metrics/invocations/global/latest:
+ summary: Latest Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: limit
+ description: Number of days to get back in time. Default is 20.
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CounterMap'
+ description: A map where keys are day (formatted using yyyyMMdd pattern)
+ and values are counter of invocations on this day
+ operationId: GetLatestAggregatedInvocationsStats
+ summary: Get aggregated invocations statistics for latest days
+ /metrics/tests/latest:
+ summary: Lastest Test results across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: limit
+ description: Number of days to consider for test results to return. Default
+ is 7 (one week)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResultSummary'
+ description: Test results summary for specified last days.
+ operationId: GetLatestTestResults
+ summary: Get latest tests results
+ /jobs/{id}/start:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Started ImportJob
+ security:
+ - jwt-bearer:
+ - manager
+ - admin
+ operationId: StartImportJob
+ summary: Start an ImportJob
+ description: Starting an ImportJob forces it to immediatly import mock definitions
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/stop:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Stopped ImportJob
+ security:
+ - jwt-bearer:
+ - manager
+ - admin
+ operationId: StopImportJob
+ summary: Stop an ImportJob
+ description: "Stopping an ImportJob desactivate it, so that it won't execute\
+ \ at next schedule"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/activate:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: ImportJob is activated
+ security:
+ - jwt-bearer:
+ - manager
+ - admin
+ operationId: ActivateImportJob
+ summary: Activate an ImportJob
+ description: "Make an ImportJob active, so that it is executed"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/labels:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LabelsMap'
+ description: "Already used labels: keys are label Keys, values are array\
+ \ of label Values"
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServicesLabels
+ summary: Get the already used labels for Services
+ /artifact/download:
+ summary: Deals with artifacts to be downloaded and imported by Microcks.
+ post:
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ $ref: '#/components/schemas/ArtifactDownload'
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact was imported and Service found
+ "204":
+ description: No url attribute found in download data
+ "400":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact content is invalid and not understood
+ security:
+ - jwt-bearer:
+ - manager
+ operationId: downloadArtifact
+ summary: Download an artifact
+ description: Ask Microcks to download an artifact and import it
+ /secrets/search:
+ get:
+ tags:
+ - config
+ parameters:
+ - name: name
+ description: Search using this name-like criterion
+ schema:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Secret'
+ description: List of found Secrets (filtered according search criteria)
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: SearchSecrets
+ summary: Search for Secrets
+ /artifact/upload:
+ summary: Deals with artifacts to be imported by Microcks.
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/ArtifactUpload'
+ examples:
+ Artifact upload:
+ value: |
+ POST /api/artifact/upload HTTP/1.1
+ Host: microcks
+ User-Agent: curl/7.54.0
+ Accept: */*
+ Authorization: Bearer
+ Content-Length: 2743
+ Expect: 100-continue
+ Content-Type: multipart/form-data; boundary=------------------------8af8cbb56dd4bde0
+
+ --------------------------8af8cbb56dd4bde0
+ Content-Disposition: form-data; name="file"; filename="github.json"
+ Content-Type: application/octet-stream
+
+ THE ARTIFACT HERE
+
+ --------------------------8af8cbb56dd4bde0--
+ required: true
+ tags:
+ - job
+ parameters:
+ - name: mainArtifact
+ description: Flag telling if this should be considered as primary or secondary
+ artifact. Default to 'true'
+ schema:
+ type: boolean
+ in: query
+ required: true
+ responses:
+ "201":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact was imported and Service found
+ "204":
+ description: No file attribute found in uploaded data
+ "400":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact content is invalid and not understood
+ security:
+ - jwt-bearer:
+ - manager
+ operationId: uploadArtifact
+ summary: Upload an artifact
+ description: Uploads an artifact to be imported by Microcks.
+components:
+ schemas:
+ TestCaseResult:
+ description: Companion objects for TestResult. Each TestCaseResult correspond
+ to a particuliar service operation / action reference by the operationName
+ field. TestCaseResults owns a collection of TestStepResults (one for every
+ request associated to service operation / action).
+ required:
+ - success
+ - elapsedTime
+ - operationName
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test case beginning
+ type: number
+ operationName:
+ description: Name of operation this test case is bound to
+ type: string
+ testStepResults:
+ description: Test steps associated to this test case
+ type: array
+ items:
+ $ref: '#/components/schemas/TestStepResult'
+ ServiceRef:
+ description: Lightweight reference of an existing Service
+ required:
+ - serviceId
+ - name
+ - version
+ properties:
+ serviceId:
+ description: Unique reference of a Service
+ type: string
+ name:
+ description: The Service name
+ type: string
+ version:
+ description: The Service version
+ type: string
+ SecretRef:
+ description: Lightweight reference for an existing Secret
+ required:
+ - secretId
+ - name
+ properties:
+ secretId:
+ description: Unique identifier or referenced Secret
+ type: string
+ name:
+ description: Distinct name of the referenced Secret
+ type: string
+ example: |-
+ {
+ "secretId": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal"
+ }
+ Secret:
+ description: A Secret allows grouping informations on how to access a restricted
+ resource such as a repsoitory URL. Secrets are typically used by ImpoortJobs.
+ required:
+ - name
+ - description
+ properties:
+ id:
+ description: Unique identifier of Secret
+ type: string
+ name:
+ description: Unique distinct name of Secret
+ type: string
+ username:
+ type: string
+ password:
+ type: string
+ token:
+ type: string
+ tokenHeader:
+ type: string
+ caCertPem:
+ type: string
+ description:
+ description: Description of this Secret
+ type: string
+ example: |-
+ {
+ "id": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal",
+ "description": "Gogs internal corporate repository",
+ "username": "team",
+ "password": "team",
+ "caCertPem": "-----BEGIN CERTIFICATE-----\nMIIC6jCCAdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu\nc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIwHhcNMTgwNzE4MTA0ODIyWhcNMjMwNzE3\nMTA0ODIzWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIw\nggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCyaP1jlpnm8WpfCSnUa8Qt\nhdUynOLLgElUtpWoW25wB9tO2ZmEj+fVsTyzEsW8+nfXXfRsBEzPm2ze9uEMTPTB\nAY0k7DbLZfjmF1lCckUvvh1rR/8hoPuXETjXUuOdtm7gRHTOxLQyH2Qi/q0DYJAn\nprKyRCLa35pRnykL6v4bHkqFnqDEho63i29XHhm2703moh4YCl1iYa2Rh6D44cjn\n8lBCq6o7zoZSmc/aBamRkQrfZYcolR8OUtDS4oEB0zMftmea2ycashsLEMB+Cq4r\n64NI2QM7qOxdTuXsDivHfLl7RTuWEOozGaJXoiPaGU/3d/KnY0gKJ2TC1KXt6Xjn\nAgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG\nSIb3DQEBCwUAA4IBAQCeUmxfUzw0VAFG6HvVYIsfvumiIvsSWmclGIZqNJyfMHFD\nMy6xzPRNNfWe5aumGTJsuIzuXfDRcdO7KmH1d2/5brkvWpxp6svVrYPvcoXjl4VN\nQR2mv5Di4KHfiiwvP3eeewjUZj+uREGqX2fcbJPHTPy32Kpb0H8Uy09BklhjC7QP\ngRAGexPhU1oBL/CoOwbHKcQ6dxs/y1SxzI8gXEtec4z62CroI13iT7U0UjSqFBE4\nKfrJombfz0d68781Z40ll+8my251ZNfbLBhQ3UHW0JnkBEQkE1aBorUoj2iakYvx\nA2qZh+8q2b8MwMb2YsQ0dlxKd6c4tN3lmMnO4bnd\n-----END CERTIFICATE-----"
+ }
+ TestCaseReturnDTO:
+ required:
+ - operationName
+ properties:
+ operationName:
+ description: Name of related operation for this TestCase
+ type: string
+ TestReturn:
+ description: TestReturn is used for wrapping the return code of a test step
+ execution
+ required:
+ - code
+ - elapsedTime
+ properties:
+ code:
+ description: "Return code for test (0 means Success, 1 means Failure)"
+ type: integer
+ elapsedTime:
+ format: int64
+ description: Elapsed time in milliseconds
+ type: integer
+ message:
+ description: Error message if any
+ type: string
+ request:
+ $ref: '#/components/schemas/Request'
+ description: Request sent for this test
+ response:
+ $ref: '#/components/schemas/Response'
+ description: Response returned for this test
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Event Message received for this test
+ Header:
+ description: Transport headers for both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this Header
+ type: array
+ items:
+ type: string
+ TestStepResult:
+ description: TestStepResult is an entity embedded within TestCaseResult. They
+ are created for each request associated with an operation / action of a microservice.
+ required:
+ - success
+ - elapsedTome
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test step beginning
+ type: number
+ requestName:
+ description: Name of request this test step is bound to
+ type: string
+ message:
+ description: Error message that may be associated to this test step
+ type: string
+ eventMessageName:
+ description: Name of event this test step is bound to
+ type: string
+ KeycloakConfig:
+ description: Representation of Keycloak / SSO configuration used by Microcks
+ server
+ required:
+ - realm
+ - auth-server-url
+ - public-client
+ - ssl-required
+ - resource
+ - enabled
+ type: object
+ properties:
+ realm:
+ description: Authentication realm name
+ type: string
+ auth-server-url:
+ description: SSO Server authentication url
+ type: string
+ public-client:
+ description: Name of public-client that can be used for requesting OAuth
+ token
+ type: boolean
+ ssl-required:
+ description: SSL certificates requirements
+ enum:
+ - none
+ - external
+ resource:
+ description: Name of Keycloak resource/application used on client side
+ type: string
+ enabled:
+ description: Whether Keycloak authentification and usage is enabled
+ type: boolean
+ RequestResponsePair:
+ description: Request associated with corresponding Response
+ type: object
+ allOf:
+ - required:
+ - request
+ - response
+ type: object
+ properties:
+ request:
+ $ref: '#/components/schemas/Request'
+ description: The request part of the pair
+ response:
+ $ref: '#/components/schemas/Response'
+ description: The Response part of the pair
+ - $ref: '#/components/schemas/AbstractExchange'
+ OperationOverrideDTO:
+ description: Data Transfer object for grouping the mutable properties of an
+ Operation
+ type: object
+ properties:
+ dispatcher:
+ description: Type of dispatcher to apply for this operation
+ type: string
+ dispatcherRules:
+ description: Rules of dispatcher for this operation
+ type: string
+ defaultDelay:
+ description: Default delay in milliseconds to apply to mock responses on
+ this operation
+ type: integer
+ parameterConstraints:
+ description: Constraints that may apply to incoming parameters on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ ParameterConstraint:
+ description: Companion object for Operation that may be used to express constraints
+ on request parameters
+ required:
+ - name
+ type: object
+ properties:
+ name:
+ description: Parameter name
+ type: string
+ required:
+ description: Whether it's a required constraint
+ type: boolean
+ recopy:
+ description: Whether it's a recopy constraint
+ type: boolean
+ mustMatchRegexp:
+ description: Whether it's a regular expression matching constraint
+ type: string
+ in:
+ description: Parameter location
+ enum:
+ - path
+ - query
+ - header
+ type: string
+ Metadata:
+ description: Commodity object for holding metadata on any entity. This object
+ is inspired by Kubernetes metadata.
+ required:
+ - createdOn
+ - lastUpdate
+ type: object
+ properties:
+ createdOn:
+ description: Creation date of attached object
+ type: number
+ readOnly: true
+ lastUpdate:
+ description: Last update of attached object
+ type: number
+ readOnly: true
+ annotations:
+ description: Annotations of attached object
+ type: object
+ additionalProperties:
+ type: string
+ labels:
+ description: Labels put on attached object
+ type: object
+ additionalProperties:
+ type: string
+ LabelsMap:
+ description: A map which keys are already used labels keys and values are already
+ used values for this key
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/StringArray'
+ type: object
+ UnidirectionalEvent:
+ description: Representation of an unidirectional exchange as an event message
+ type: object
+ allOf:
+ - required:
+ - eventMessage
+ type: object
+ properties:
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Asynchronous message for this unidirectional event
+ - $ref: '#/components/schemas/AbstractExchange'
+ StringArray:
+ description: A simple array of String
+ type: array
+ items:
+ type: string
+ MessageArray:
+ description: Array of Exchanges for Service operations
+ type: array
+ items:
+ $ref: '#/components/schemas/Exchange'
+ Exchange:
+ oneOf:
+ - $ref: '#/components/schemas/RequestResponsePair'
+ - $ref: '#/components/schemas/UnidirectionalEvent'
+ discriminator:
+ propertyName: type
+ mapping:
+ reqRespPair: '#/components/schemas/RequestResponsePair'
+ unidirEvent: '#/components/schemas/UnidirectionalEvent'
+ description: "Abstract representation of a Service or API exchange type (request/response,\
+ \ event based, ...)"
+ AbstractExchange:
+ description: Abstract bean representing a Service or API Exchange.
+ required:
+ - type
+ type: object
+ properties:
+ type:
+ description: Discriminant type for identifying kind of exchange
+ enum:
+ - reqRespPair
+ - unidirEvent
+ type: string
+ ServiceView:
+ description: Aggregate bean for grouping a Service an its messages pairs
+ required:
+ - service
+ - messagesMap
+ type: object
+ properties:
+ service:
+ $ref: '#/components/schemas/Service'
+ description: Wrapped service description
+ messagesMap:
+ description: "Map of messages for this Service. Keys are operation name,\
+ \ values are array of messages for this operation"
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MessageArray'
+ TestRequest:
+ description: Test request is a minimalist wrapper for requesting the launch
+ of a new test
+ required:
+ - serviceId
+ - testEndpoint
+ - runnerType
+ - timeout
+ properties:
+ serviceId:
+ description: Unique identifier of service to test
+ type: string
+ testEndpoint:
+ description: Endpoint to test for this service
+ type: string
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ filteredOperations:
+ description: A restriction on service operations to test
+ type: array
+ items:
+ type: string
+ secretName:
+ description: The name of Secret to use for connecting the test endpoint
+ type: string
+ oAuth2Context:
+ $ref: '#/components/schemas/OAuth2ClientContent'
+ description: An OAuth2 context to use for retrieving an access token prior
+ invoking the tested endpoint
+ operationsHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ Resource:
+ description: "Resource represents a Service or API artifacts such as specification,\
+ \ contract"
+ required:
+ - id
+ - name
+ - content
+ - type
+ - serviceId
+ type: object
+ properties:
+ id:
+ description: Uniquer identifier of this Service or API Resource
+ type: string
+ name:
+ description: Unique name/business identifier for this Service or API resource
+ type: string
+ content:
+ description: String content of this resource
+ type: string
+ type:
+ $ref: '#/components/schemas/ResourceType'
+ description: Type of this Service or API resource
+ serviceId:
+ description: Unique identifier of the Servoce or API this resource is attached
+ to
+ type: string
+ path:
+ description: Relative path of this resource regarding main resource
+ type: string
+ sourceArtifact:
+ description: Short name of the artifact this resource was extracted from
+ type: string
+ TestRunnerType:
+ description: Type of test strategy (different strategies are implemented by
+ different runners)
+ enum:
+ - HTTP
+ - SOAP_HTTP
+ - SOAP_UI
+ - POSTMAN
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SCHEMA
+ - GRPC_PROTOBUF
+ - GRAPHQL_SCHEMA
+ type: string
+ Operation:
+ description: An Operation of a Service or API
+ required:
+ - name
+ - method
+ type: object
+ properties:
+ name:
+ description: Unique name of this Operation within Service scope
+ type: string
+ method:
+ description: Represents transport method
+ type: string
+ inputName:
+ description: Name of input parameters in case of Xml based Service
+ type: string
+ outputName:
+ description: Name of output parameters in case of Xml based Service
+ type: string
+ dispatcher:
+ description: Dispatcher strategy used for mocks
+ type: string
+ dispatcherRules:
+ description: DispatcherRules used for mocks
+ type: string
+ defaultDelay:
+ description: Default response time delay for mocks
+ type: number
+ resourcePaths:
+ description: Paths the mocks endpoints are mapped on
+ type: array
+ items:
+ type: string
+ parameterContraints:
+ description: Contraints that may apply to mock invocatino on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ bindings:
+ description: Map of protocol binding details for this operation
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Binding'
+ ArtifactUpload:
+ description: |-
+ Artifact to be imported by Microcks.
+ This structure represents a mime-multipart file upload (as specified here: https://swagger.io/docs/specification/describing-request-body/file-upload/)
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The artifact to upload
+ type: string
+ Counter:
+ description: A simple Counter type.
+ type: object
+ properties:
+ counter:
+ format: int32
+ description: Number of items in a resource collection
+ type: integer
+ example: |-
+ {
+ "counter": 12
+ }
+ FeaturesConfig:
+ title: Root Type for FeaturesConfig
+ description: Representation of optional features configuration used by Microcks
+ server
+ type: object
+ properties:
+ repository-filter:
+ description: Repository filtering feature properties
+ type: object
+ properties:
+ label-label:
+ type: string
+ enabled:
+ type: string
+ label-list:
+ type: string
+ label-key:
+ type: string
+ microcks-hub:
+ description: Microcks Hub feature properties
+ type: object
+ properties:
+ allowed-roles:
+ type: string
+ endpoint:
+ type: string
+ enabled:
+ type: string
+ repository-tenancy:
+ description: Repository tenancy feature properties
+ type: object
+ properties:
+ enabled:
+ type: string
+ artifact-import-allowed-roles:
+ type: string
+ async-api:
+ description: Asynchronous feature properties
+ type: object
+ properties:
+ default-binding:
+ type: string
+ endpoint-MQTT:
+ type: string
+ endpoint-WS:
+ type: string
+ endpoint-KAFKA:
+ type: string
+ endpoint-AMQP:
+ type: string
+ endpoint-NATS:
+ type: string
+ endpoint-GOOGLEPUBSUB:
+ type: string
+ enabled:
+ type: string
+ frequencies:
+ type: string
+ additionalProperties: true
+ example:
+ repository-filter:
+ label-label: Domain
+ enabled: "true"
+ label-list: "domain,status"
+ label-key: domain
+ microcks-hub:
+ allowed-roles: "admin,manager,manager-any"
+ endpoint: https://hub.microcks.io/api
+ enabled: "true"
+ repository-tenancy:
+ enabled: "false"
+ artifact-import-allowed-roles: "admin,manager,manager-any"
+ async-api:
+ default-binding: KAFKA
+ endpoint-MQTT: my-mqtt-broker.apps.try.microcks.io
+ endpoint-WS: localhost:8081
+ endpoint-KAFKA: my-cluster-kafka-bootstrap.apps.try.microcks.io
+ enabled: "false"
+ frequencies: "3,10,30"
+ SnapshotUpload:
+ description: Upload of a repository snapshot file
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The repository snapshot file
+ type: string
+ HeaderDTO:
+ description: Data Transfert Object for headers of both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this header (comma separated strings)
+ type: string
+ OperationHeaders:
+ description: "Specification of additional headers for a Service/API operations.\
+ \ Keys are operation name or \"globals\" (if header applies to all), values\
+ \ are Header objects DTO."
+ type: object
+ additionalProperties:
+ type: array
+ items:
+ $ref: '#/components/schemas/HeaderDTO'
+ Service:
+ description: Represents a Service or API definition as registred into Microcks
+ repository
+ required:
+ - name
+ - version
+ - type
+ - sourceArtifact
+ properties:
+ id:
+ description: Unique identifier for this Service or API
+ type: string
+ name:
+ description: Distinct name for this Service or API (maybe shared among many
+ versions)
+ type: string
+ version:
+ description: Distinct version for a named Service or API
+ type: string
+ type:
+ description: Service or API Type
+ enum:
+ - REST
+ - SOAP_HTTP
+ - GENERIC_REST
+ - GENERIC_EVENT
+ - EVENT
+ - GRPC
+ - GRAPHQL
+ type: string
+ operations:
+ description: Set of Operations for Service or API
+ type: array
+ items:
+ $ref: '#/components/schemas/Operation'
+ xmlNS:
+ description: Associated Xml Namespace in case of Xml based Service
+ type: string
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of Service
+ sourceArtifact:
+ description: Short name of the main/primary artifact this service was created
+ from
+ type: string
+ Trend:
+ description: Evolution trend qualifier
+ enum:
+ - DOWN
+ - LOW_DOWN
+ - STABLE
+ - LOW_UP
+ - UP
+ type: string
+ WeightedMetricValue:
+ description: Value of a metric with an associated weight
+ required:
+ - name
+ - weight
+ - value
+ type: object
+ properties:
+ name:
+ description: Metric name or serie name
+ type: string
+ weight:
+ description: Weight of this metric value (typically a percentage)
+ type: integer
+ value:
+ description: The value of this metric
+ type: integer
+ DailyInvocationStatistic:
+ description: The daily statistic of a service mock invocations
+ required:
+ - id
+ - day
+ - serviceName
+ - serviceVersion
+ - dailyCount
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this statistic object
+ type: string
+ day:
+ description: The day (formatted as yyyyMMdd string) represented by this
+ statistic
+ type: string
+ serviceName:
+ description: The name of the service this statistic is related to
+ type: string
+ serviceVersion:
+ description: The version of the service this statistic is related to
+ type: string
+ dailyCount:
+ description: The number of service mock invocations on this day
+ type: number
+ hourlyCount:
+ description: The number of service mock invocations per hour of the day
+ (keys range from 0 to 23)
+ type: object
+ additionalProperties: true
+ minuteCount:
+ description: The number of service mock invocations per minute of the day
+ (keys range from 0 to 1439)
+ type: object
+ additionalProperties: true
+ TestConformanceMetric:
+ description: "Represents the test conformance metrics (current score, history\
+ \ and evolution trend) of a Service"
+ required:
+ - id
+ - serviceId
+ - currentScore
+ - maxPossibleScore
+ type: object
+ properties:
+ id:
+ description: Unique identifier of coverage metric
+ type: string
+ serviceId:
+ description: Unique identifier of the Service this metric is related to
+ type: string
+ aggregationLabelValue:
+ description: Value of the label used for metrics aggregation (if any)
+ type: string
+ maxPossibleScore:
+ format: double
+ description: Maximum conformance score that can be reached (depends on samples
+ expresiveness)
+ type: number
+ currentScore:
+ format: double
+ description: Current test conformance score for the related Service
+ type: number
+ lastUpdateDay:
+ description: The day of latest score update (in yyyyMMdd format)
+ type: string
+ latestTrend:
+ $ref: '#/components/schemas/Trend'
+ description: Evolution trend of currentScore
+ latestScores:
+ description: "History of latest scores (key is date with format yyyyMMdd,\
+ \ value is score as double)"
+ type: object
+ additionalProperties:
+ type: number
+ TestResultSummary:
+ description: 'Represents the summary result of a Service or API test run by
+ Microcks. '
+ required:
+ - id
+ - testDate
+ - serviceId
+ - success
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ testDate:
+ format: int64
+ description: Timestamp of creation date of this service
+ type: integer
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ TestResult:
+ description: "Represents the result of a Service or API test run by Microcks.\
+ \ Tests are related to a service and made of multiple test cases corresponding\
+ \ to each operations / actions composing service. Tests are run against a\
+ \ specific endpoint named testedEndpoint. It holds global markers telling\
+ \ if test still ran, is a success, how many times is has taken and so on ..."
+ required:
+ - id
+ - version
+ - testNumber
+ - testDate
+ - testedEndpoint
+ - serviceId
+ - success
+ - inProgress
+ - runnerType
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ version:
+ description: Revision number of this test
+ type: number
+ testNumber:
+ description: Incremental number for tracking number of tests of a service
+ type: number
+ testDate:
+ format: int64
+ description: Timestamp of creation date of this service
+ type: integer
+ testedEndpoint:
+ description: Endpoint used during test
+ type: string
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ elapsedTime:
+ description: Elapsed time in milliseconds since test beginning
+ type: number
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ inProgress:
+ description: Flag telling is test is still in progress
+ type: boolean
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ testCaseResults:
+ description: TestCase results associated to this test
+ type: array
+ items:
+ $ref: '#/components/schemas/TestCaseResult'
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: The referrence of the Secret used for connecting to test endpoint
+ operationHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ authorizedClient:
+ $ref: '#/components/schemas/OAuth2AuthorizedClient'
+ description: The OAuth2 authorized client that performed the test
+ Binding:
+ description: Protocol binding details for asynchronous operations
+ required:
+ - type
+ - destinationName
+ type: object
+ properties:
+ type:
+ description: Protocol binding identifier
+ enum:
+ - KAFKA
+ - MQTT
+ - WS
+ - AMQP
+ - NATS
+ - GOOGLEPUBSUB
+ type: string
+ keyType:
+ description: Type of key for Kafka messages
+ type: string
+ destinationType:
+ description: Type of destination for asynchronous messages of this operation
+ type: string
+ destinationName:
+ description: Name of destination for asynchronous messages of this operation
+ type: string
+ qoS:
+ description: Quality of Service attribute for MQTT binding
+ type: string
+ persistent:
+ description: Persistent attribute for MQTT binding
+ type: boolean
+ method:
+ description: HTTP method for WebSocket binding
+ type: string
+ ResourceType:
+ description: Types of managed resources for Services or APIs
+ enum:
+ - WSDL
+ - XSD
+ - JSON_SCHEMA
+ - OPEN_API_SPEC
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SPEC
+ - ASYNC_API_SCHEMA
+ - AVRO_SCHEMA
+ - PROTOBUF_SCHEMA
+ - PROTOBUF_DESCRIPTION
+ - GRAPHQL_SCHEMA
+ - POSTMAN_COLLECTION
+ type: string
+ CounterMap:
+ description: A generic map of counter
+ type: object
+ additionalProperties:
+ type: number
+ OAuth2ClientContent:
+ description: Represents a volatile OAuth2 client context usually associated
+ with a Test request
+ required:
+ - clientId
+ - clientSecret
+ - tokenUri
+ type: object
+ properties:
+ clientId:
+ description: Id for connecting to OAuth2 identity provider
+ type: string
+ clientSecret:
+ format: password
+ description: Secret for connecting to OAuth2 identity provider
+ type: string
+ tokenUri:
+ description: URI for retrieving an access token from OAuth2 identity provider
+ type: string
+ username:
+ description: Username in case you're using the Resource Owner Password flow
+ type: string
+ password:
+ description: User password in case you're suing the Resource Owner password
+ flow
+ type: string
+ refreshToken:
+ description: Refresh token in case you're using the Refresh Token rotation
+ flow
+ type: string
+ OAuth2GrantType:
+ description: Enumeration for the different supported grants/flows of OAuth2
+ enum:
+ - PASSWORD
+ - CLIENT_CREDENTIALS
+ - REFRESH_TOKEN
+ type: string
+ OAuth2AuthorizedClient:
+ description: OAuth2 authorized client that performed a test
+ required:
+ - grantType
+ - principalName
+ - tokenUri
+ type: object
+ properties:
+ grantType:
+ $ref: '#/components/schemas/OAuth2GrantType'
+ description: OAuth2 authorization flow/grant type applied
+ principalName:
+ description: Name of authorized principal (clientId or username in the case
+ of Password grant type)
+ type: string
+ tokenUri:
+ description: Identity Provider URI used for token retrieval
+ type: string
+ scopes:
+ description: Included scopes (separated using space)
+ type: string
+ ArtifactDownload:
+ description: Artifact Download specification to be imported by Microcks.
+ required:
+ - url
+ type: object
+ properties:
+ url:
+ description: The URL of remote artifact to download and import
+ type: string
+ mainArtifact:
+ description: Whether this remote artifact should be imported as main/primary
+ or secondary artifact. Default is true.
+ type: boolean
+ secretName:
+ description: The name of a secret that can be used to authenticated when
+ downloading remote artifact.
+ type: string
+ ImportJob:
+ description: An ImportJob allow defining a repository artifact to poll for discovering
+ Services and APIs mocks and tests
+ required:
+ - name
+ - repositoryUrl
+ properties:
+ id:
+ description: Unique identifier of ImportJob
+ type: string
+ name:
+ description: Unique distinct name of this ImportJob
+ type: string
+ repositoryUrl:
+ description: URL of mocks and tests repository artifact
+ type: string
+ repositoryDisableSSLValidation:
+ description: Whether to disable SSL certificate verification when checking
+ repository
+ type: boolean
+ frequency:
+ description: Reserved for future usage
+ type: string
+ createdDate:
+ format: int64
+ description: Creation timestamp for this ImportJob
+ type: integer
+ lastImportDate:
+ format: int64
+ description: Timestamp of the last import
+ type: integer
+ lastImportError:
+ description: Error message of last import (if any)
+ type: string
+ active:
+ description: Whether this ImportJob is active (ie. scheduled for execution)
+ type: boolean
+ etag:
+ description: Etag of repository URL during previous import. Is used for
+ not re-importing if no recent changes
+ type: string
+ serviceRefs:
+ description: References of Services discovered when checking repository
+ type: array
+ items:
+ $ref: '#/components/schemas/ServiceRef'
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of ImportJob
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: Reference of a Secret to used when checking repository
+ mainArtifact:
+ description: Flag telling if considered as primary or secondary artifact.
+ Default to `true`
+ type: boolean
+ Message:
+ description: "Common structure for Request, Response and EventMessage"
+ required:
+ - name
+ - operationId
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this message
+ type: string
+ name:
+ description: Unique distinct name of this message
+ type: string
+ content:
+ description: Body content for this message
+ type: string
+ operationId:
+ description: Identifier of Operation this message is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this message is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this message
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Request:
+ description: A mock invocation or test request
+ allOf:
+ - type: object
+ properties:
+ responseId:
+ description: Unique identifier of Response this Request is attached
+ type: string
+ queryParameters:
+ description: Query parameters for this Request if any
+ type: array
+ items:
+ $ref: '#/components/schemas/Parameter'
+ - $ref: '#/components/schemas/Message'
+ Response:
+ description: A mock invocation or test response
+ allOf:
+ - type: object
+ properties:
+ status:
+ description: Status of this Response
+ type: string
+ mediaType:
+ description: Content type of this Response
+ type: string
+ dispatchCriteria:
+ description: Dispatch criteria of this Response (in case of a mock)
+ type: string
+ isFault:
+ description: Whether this Response represents a Fault
+ type: boolean
+ - $ref: '#/components/schemas/Message'
+ EventMessage:
+ description: A simple event message published or received in an asynchronous
+ exchange
+ type: object
+ allOf:
+ - required:
+ - id
+ - mediaType
+ type: object
+ properties:
+ mediaType:
+ description: Content type of message
+ type: string
+ dispatchCriteria:
+ description: Dispatch criteria of this message (in case of a mock)
+ type: string
+ - $ref: '#/components/schemas/Message'
+ Parameter:
+ description: Companion objects for Request representing query parameter
+ required:
+ - name
+ - value
+ type: object
+ properties:
+ name:
+ description: The name of the parameter
+ type: string
+ value:
+ description: The value of this parameter
+ type: string
+ responses:
+ ServiceResponse:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/Service'
+ - $ref: '#/components/schemas/ServiceView'
+ description: ""
+ securitySchemes:
+ jwt-bearer:
+ flows:
+ clientCredentials:
+ tokenUrl: https://keycloak.example.com/realms/microcks/protocol/openid-connect/token
+ refreshUrl: https://keycloak.example.com/realms/microcks/protocol/openid-connect/token
+ scopes:
+ user: Simple authenticated user
+ manager: Services & APIs content manager
+ admin: Administrator of the Microcks instance
+ type: oauth2
+ description: JWT Bearer acquired using OAuth 2 Authentication flow or Direct
+ Access Grant
+security:
+ - jwt-bearer: []
+tags:
+ - name: mock
+ description: Operations related to API and Services mocks
+ - name: test
+ description: Operations related to API and Services tests
+ - name: job
+ description: Operations related to Jobs for discovering mocks and tests
+ - name: config
+ description: Operations related to configuration
+ - name: metrics
+ description: Operations related to metrics
diff --git a/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.12.yaml b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.12.yaml
new file mode 100644
index 000000000..7b0b77d86
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.12.yaml
@@ -0,0 +1,2314 @@
+---
+openapi: 3.0.2
+info:
+ title: Microcks API v1.12
+ version: 1.12.0
+ description: "API offered by Microcks, the Kubernetes native tool for API and microservices\
+ \ mocking and testing (microcks.io)"
+ contact:
+ name: Laurent Broudoux
+ url: https://github.com/microcks
+ email: laurent@microcks.io
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0
+ x-logo:
+ backgroundColor: '#ffffff'
+ url: https://microcks.io/images/microcks-logo-blue.png
+servers:
+- url: http://microcks.example.com/api
+ description: ""
+paths:
+ /services:
+ summary: This path operations deal with Services
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: page
+ description: Page of Services to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of Services to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServices
+ summary: Get Services and APIs
+ /tests:
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestRequest'
+ required: true
+ tags:
+ - test
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Created TestResult (empty shell cause tests are executed asynchronously)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateTest
+ summary: Create a new Test
+ /services/count:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Services in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServicesCounter
+ summary: Get the Services counter
+ /jobs:
+ summary: This path operations deal with ImportJobs
+ get:
+ tags:
+ - job
+ parameters:
+ - name: page
+ description: Page of ImportJobs to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of ImportJobs to include in a
+ response (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ - name: name
+ description: Name like criterion for query
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ImportJob'
+ description: List of found ImportJobs
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobs
+ summary: Get ImportJobs
+ description: Retrieve a list of ImportJobs
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Created ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateImportJob
+ summary: Create ImportJob
+ description: Create a new ImportJob
+ /jobs/{id}:
+ summary: This path or subpaths operations deal with specific ImportJob having
+ given id
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Found ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJob
+ summary: Get ImportJob
+ description: Retrieve an ImportJob using its identifier
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Updated ImportJob
+ operationId: UpdateImportJob
+ summary: Update ImportJob
+ description: Update an ImportJob
+ delete:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: ImportJob deleted
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: DeleteImportJob
+ summary: Delete ImportJob
+ description: Delete an ImportJob
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: messages
+ description: Whether to include details on services messages into result.
+ Default is false
+ schema:
+ type: boolean
+ in: query
+ responses:
+ "200":
+ $ref: '#/components/responses/ServiceResponse'
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetService
+ summary: Get Service
+ delete:
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: DeleteService
+ summary: Delete Service
+ description: Delete a Service
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/count:
+ summary: Count ImportJobs
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of ImportJobs in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobCounter
+ summary: Get the ImportJobs counter
+ /secrets:
+ summary: This path operations deal with Secrets
+ get:
+ tags:
+ - config
+ parameters:
+ - name: page
+ description: Page of Secrets to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ required: false
+ - name: size
+ description: Size of a page. Maximum number of Secrets to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ required: false
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Secret'
+ description: List of found Secrets
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecrets
+ summary: Get Secrets
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ tags:
+ - config
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Created Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: CreateSecret
+ summary: Create a new Secret
+ /secrets/{id}:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Found Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetSecret
+ summary: Get Secret
+ description: Retrieve a Secret
+ put:
+ requestBody:
+ description: The Secret to update
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ required: true
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Updated Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: UpdateSecret
+ summary: Update Secret
+ description: Update a Secret
+ delete:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Secret has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: DeleteSecret
+ summary: Delete Secret
+ description: Delete a Secret
+ parameters:
+ - name: id
+ description: Unique identifier of Secret to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /secrets/count:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Secrets in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecretsCounter
+ summary: Get the Secrets counter
+ /tests/service/{serviceId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResult'
+ description: List of TestResults for the Service having the requested id
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByService
+ summary: Get TestResults by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/service/{serviceId}/count:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of TestResults for this Service in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByServiceCounter
+ summary: Get the TestResults for Service counter
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Requested TestResult
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResult
+ summary: Get TestResult
+ description: ""
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/messages/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RequestResponsePair'
+ description: List of request and response messages for this TestCase
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetMessagesByTestCase
+ summary: Get messages for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/testCaseResult:
+ post:
+ requestBody:
+ description: TestCase return wrapper object
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseReturnDTO'
+ required: true
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseResult'
+ description: TestCaseResult is reported
+ operationId: ReportTestCaseResult
+ summary: Report and create a new TestCaseResult
+ description: Report a TestCaseResult (typically used by a Test runner)
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /keycloak/config:
+ summary: Keycloak Authentification configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KeycloakConfig'
+ description: Get current configuration
+ operationId: GetKeycloakConfig
+ summary: Get authentification configuration
+ /services/{id}/operation:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OperationOverrideDTO'
+ required: true
+ tags:
+ - mock
+ parameters:
+ - name: operationName
+ description: Name of operation to update
+ schema:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ description: Operation has been updated
+ "500":
+ description: Operation cannot be updated
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: OverrideServiceOperation
+ summary: Override Service Operation
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}/metadata:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Metadata'
+ required: true
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service metadata has been updated
+ "500":
+ description: Update of metadata failed
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: UpdateServiceMetadata
+ summary: Update Service Metadata
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/search:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: queryMap
+ description: Map of criterion. Key can be simply 'name' with value as the
+ searched string. You can also search by label using keys like 'labels.x'
+ where 'x' is the label and value the label value
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services (filtered according search criteria)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: SearchServices
+ summary: Search for Services and APIs
+ /tests/{id}/events/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/UnidirectionalEvent'
+ description: List of event messages for this TestCase
+ operationId: GetEventsByTestCase
+ summary: Get events for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/{name}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Resource'
+ description: Retrieve the resource having this name
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResource
+ summary: Get Resource
+ parameters:
+ - name: name
+ description: Unique name/business identifier of the Service or API resource
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/service/{serviceId}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Resource'
+ description: List the resources attached to a Service or API
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResourcesByService
+ summary: Get Resources by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of the Service or API the resources are attached
+ to
+ schema:
+ type: string
+ in: path
+ required: true
+ /features/config:
+ summary: Optional features configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: Get features configuration
+ operationId: GetFeaturesConfig
+ summary: Get features configuration
+ /import:
+ summary: Deals with repository snapshot to import in Microcks
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/SnapshotUpload'
+ required: true
+ tags:
+ - mock
+ responses:
+ "201":
+ description: Snasphot has been correctly imported
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: importSnapshot
+ summary: Import a snapshot
+ description: Import a repository snapshot previsouly exported into Microcks
+ /export:
+ summary: Deals with repository snapshot to import from Microcks
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: serviceIds
+ description: List of service identifiers to export
+ schema:
+ type: array
+ items:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ headers:
+ Content-Disposition:
+ schema:
+ type: string
+ examples:
+ filename:
+ value: attachment; filename=microcks-repository.json
+ content:
+ application/json:
+ schema:
+ format: binary
+ type: string
+ description: Snapshot file representing the export of requested services
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: exportSnapshot
+ summary: Export a snapshot
+ description: Export a repostiory snapshot with requested services
+ /metrics/invocations/global:
+ summary: Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Aggregated invocation statistics for specified day
+ operationId: GetAggregatedInvocationsStats
+ summary: Get aggregated invocation statistics for a day
+ /metrics/conformance/aggregate:
+ summary: Aggregation of Test conformance metrics
+ get:
+ tags:
+ - metrics
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/WeightedMetricValue'
+ description: Get aggregated coverage metric value
+ operationId: GetConformanceMetricsAggregation
+ summary: Get aggregation of conformance metrics
+ /metrics/conformance/service/{serviceId}:
+ summary: Test Conformance metrics on API and Services
+ get:
+ tags:
+ - metrics
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestConformanceMetric'
+ description: Test coverage metric for Service
+ operationId: GetServiceTestConformanceMetric
+ summary: Get conformance metrics for a Service
+ parameters:
+ - name: serviceId
+ description: Unique Services identifier this metrics are related to
+ schema:
+ type: string
+ in: path
+ required: true
+ /metrics/invocations/top:
+ summary: Top Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ - name: limit
+ description: The number of top invoked mocks to return
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Top invocations for a defined day
+ operationId: GetTopIvnocationsStatsByDay
+ summary: Get top invocation statistics for a day
+ /metrics/invocations/{serviceName}/{serviceVersion}:
+ summary: Invocation Statistics for API and Services
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Invocation statistics for service for specified day
+ operationId: GetInvocationStatsByService
+ summary: Get invocation statistics for Service
+ parameters:
+ - name: serviceName
+ description: Name of service to get statistics for
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: serviceVersion
+ description: Version of service to get statistics for
+ schema:
+ type: string
+ in: path
+ required: true
+ /metrics/invocations/global/latest:
+ summary: Latest Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: limit
+ description: Number of days to get back in time. Default is 20.
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CounterMap'
+ description: A map where keys are day (formatted using yyyyMMdd pattern)
+ and values are counter of invocations on this day
+ operationId: GetLatestAggregatedInvocationsStats
+ summary: Get aggregated invocations statistics for latest days
+ /metrics/tests/latest:
+ summary: Lastest Test results across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: limit
+ description: Number of days to consider for test results to return. Default
+ is 7 (one week)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResultSummary'
+ description: Test results summary for specified last days.
+ operationId: GetLatestTestResults
+ summary: Get latest tests results
+ /jobs/{id}/start:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Started ImportJob
+ security:
+ - jwt-bearer:
+ - manager
+ - admin
+ operationId: StartImportJob
+ summary: Start an ImportJob
+ description: Starting an ImportJob forces it to immediatly import mock definitions
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/stop:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Stopped ImportJob
+ security:
+ - jwt-bearer:
+ - manager
+ - admin
+ operationId: StopImportJob
+ summary: Stop an ImportJob
+ description: "Stopping an ImportJob desactivate it, so that it won't execute\
+ \ at next schedule"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/activate:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: ImportJob is activated
+ security:
+ - jwt-bearer:
+ - manager
+ - admin
+ operationId: ActivateImportJob
+ summary: Activate an ImportJob
+ description: "Make an ImportJob active, so that it is executed"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/labels:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LabelsMap'
+ description: "Already used labels: keys are label Keys, values are array\
+ \ of label Values"
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServicesLabels
+ summary: Get the already used labels for Services
+ /artifact/download:
+ summary: Deals with artifacts to be downloaded and imported by Microcks.
+ post:
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ $ref: '#/components/schemas/ArtifactDownload'
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact was imported and Service found
+ "204":
+ description: No url attribute found in download data
+ "400":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact content is invalid and not understood
+ security:
+ - jwt-bearer:
+ - manager
+ operationId: downloadArtifact
+ summary: Download an artifact
+ description: Ask Microcks to download an artifact and import it
+ /secrets/search:
+ get:
+ tags:
+ - config
+ parameters:
+ - name: name
+ description: Search using this name-like criterion
+ schema:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Secret'
+ description: List of found Secrets (filtered according search criteria)
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: SearchSecrets
+ summary: Search for Secrets
+ /artifact/upload:
+ summary: Deals with artifacts to be imported by Microcks.
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/ArtifactUpload'
+ examples:
+ Artifact upload:
+ value: |
+ POST /api/artifact/upload HTTP/1.1
+ Host: microcks
+ User-Agent: curl/7.54.0
+ Accept: */*
+ Authorization: Bearer
+ Content-Length: 2743
+ Expect: 100-continue
+ Content-Type: multipart/form-data; boundary=------------------------8af8cbb56dd4bde0
+
+ --------------------------8af8cbb56dd4bde0
+ Content-Disposition: form-data; name="file"; filename="github.json"
+ Content-Type: application/octet-stream
+
+ THE ARTIFACT HERE
+
+ --------------------------8af8cbb56dd4bde0--
+ required: true
+ tags:
+ - job
+ parameters:
+ - name: mainArtifact
+ description: Flag telling if this should be considered as primary or secondary
+ artifact. Default to 'true'
+ schema:
+ type: boolean
+ in: query
+ required: true
+ responses:
+ "201":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact was imported and Service found
+ "204":
+ description: No file attribute found in uploaded data
+ "400":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact content is invalid and not understood
+ security:
+ - jwt-bearer:
+ - manager
+ operationId: uploadArtifact
+ summary: Upload an artifact
+ description: Uploads an artifact to be imported by Microcks.
+components:
+ schemas:
+ TestCaseResult:
+ description: Companion objects for TestResult. Each TestCaseResult correspond
+ to a particuliar service operation / action reference by the operationName
+ field. TestCaseResults owns a collection of TestStepResults (one for every
+ request associated to service operation / action).
+ required:
+ - success
+ - elapsedTime
+ - operationName
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test case beginning
+ type: number
+ operationName:
+ description: Name of operation this test case is bound to
+ type: string
+ testStepResults:
+ description: Test steps associated to this test case
+ type: array
+ items:
+ $ref: '#/components/schemas/TestStepResult'
+ ServiceRef:
+ description: Lightweight reference of an existing Service
+ required:
+ - serviceId
+ - name
+ - version
+ properties:
+ serviceId:
+ description: Unique reference of a Service
+ type: string
+ name:
+ description: The Service name
+ type: string
+ version:
+ description: The Service version
+ type: string
+ SecretRef:
+ description: Lightweight reference for an existing Secret
+ required:
+ - secretId
+ - name
+ properties:
+ secretId:
+ description: Unique identifier or referenced Secret
+ type: string
+ name:
+ description: Distinct name of the referenced Secret
+ type: string
+ example: |-
+ {
+ "secretId": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal"
+ }
+ Secret:
+ description: A Secret allows grouping informations on how to access a restricted
+ resource such as a repsoitory URL. Secrets are typically used by ImpoortJobs.
+ required:
+ - name
+ - description
+ properties:
+ id:
+ description: Unique identifier of Secret
+ type: string
+ name:
+ description: Unique distinct name of Secret
+ type: string
+ username:
+ type: string
+ password:
+ type: string
+ token:
+ type: string
+ tokenHeader:
+ type: string
+ caCertPem:
+ type: string
+ description:
+ description: Description of this Secret
+ type: string
+ example: |-
+ {
+ "id": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal",
+ "description": "Gogs internal corporate repository",
+ "username": "team",
+ "password": "team",
+ "caCertPem": "-----BEGIN CERTIFICATE-----\nMIIC6jCCAdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu\nc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIwHhcNMTgwNzE4MTA0ODIyWhcNMjMwNzE3\nMTA0ODIzWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIw\nggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCyaP1jlpnm8WpfCSnUa8Qt\nhdUynOLLgElUtpWoW25wB9tO2ZmEj+fVsTyzEsW8+nfXXfRsBEzPm2ze9uEMTPTB\nAY0k7DbLZfjmF1lCckUvvh1rR/8hoPuXETjXUuOdtm7gRHTOxLQyH2Qi/q0DYJAn\nprKyRCLa35pRnykL6v4bHkqFnqDEho63i29XHhm2703moh4YCl1iYa2Rh6D44cjn\n8lBCq6o7zoZSmc/aBamRkQrfZYcolR8OUtDS4oEB0zMftmea2ycashsLEMB+Cq4r\n64NI2QM7qOxdTuXsDivHfLl7RTuWEOozGaJXoiPaGU/3d/KnY0gKJ2TC1KXt6Xjn\nAgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG\nSIb3DQEBCwUAA4IBAQCeUmxfUzw0VAFG6HvVYIsfvumiIvsSWmclGIZqNJyfMHFD\nMy6xzPRNNfWe5aumGTJsuIzuXfDRcdO7KmH1d2/5brkvWpxp6svVrYPvcoXjl4VN\nQR2mv5Di4KHfiiwvP3eeewjUZj+uREGqX2fcbJPHTPy32Kpb0H8Uy09BklhjC7QP\ngRAGexPhU1oBL/CoOwbHKcQ6dxs/y1SxzI8gXEtec4z62CroI13iT7U0UjSqFBE4\nKfrJombfz0d68781Z40ll+8my251ZNfbLBhQ3UHW0JnkBEQkE1aBorUoj2iakYvx\nA2qZh+8q2b8MwMb2YsQ0dlxKd6c4tN3lmMnO4bnd\n-----END CERTIFICATE-----"
+ }
+ TestCaseReturnDTO:
+ required:
+ - operationName
+ properties:
+ operationName:
+ description: Name of related operation for this TestCase
+ type: string
+ TestReturn:
+ description: TestReturn is used for wrapping the return code of a test step
+ execution
+ required:
+ - code
+ - elapsedTime
+ properties:
+ code:
+ description: "Return code for test (0 means Success, 1 means Failure)"
+ type: integer
+ elapsedTime:
+ format: int64
+ description: Elapsed time in milliseconds
+ type: integer
+ message:
+ description: Error message if any
+ type: string
+ request:
+ $ref: '#/components/schemas/Request'
+ description: Request sent for this test
+ response:
+ $ref: '#/components/schemas/Response'
+ description: Response returned for this test
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Event Message received for this test
+ Header:
+ description: Transport headers for both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this Header
+ type: array
+ items:
+ type: string
+ TestStepResult:
+ description: TestStepResult is an entity embedded within TestCaseResult. They
+ are created for each request associated with an operation / action of a microservice.
+ required:
+ - success
+ - elapsedTome
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test step beginning
+ type: number
+ requestName:
+ description: Name of request this test step is bound to
+ type: string
+ message:
+ description: Error message that may be associated to this test step
+ type: string
+ eventMessageName:
+ description: Name of event this test step is bound to
+ type: string
+ KeycloakConfig:
+ description: Representation of Keycloak / SSO configuration used by Microcks
+ server
+ required:
+ - realm
+ - auth-server-url
+ - public-client
+ - ssl-required
+ - resource
+ - enabled
+ type: object
+ properties:
+ realm:
+ description: Authentication realm name
+ type: string
+ auth-server-url:
+ description: SSO Server authentication url
+ type: string
+ public-client:
+ description: Name of public-client that can be used for requesting OAuth
+ token
+ type: boolean
+ ssl-required:
+ description: SSL certificates requirements
+ enum:
+ - none
+ - external
+ resource:
+ description: Name of Keycloak resource/application used on client side
+ type: string
+ enabled:
+ description: Whether Keycloak authentification and usage is enabled
+ type: boolean
+ RequestResponsePair:
+ description: Request associated with corresponding Response
+ type: object
+ allOf:
+ - required:
+ - request
+ - response
+ type: object
+ properties:
+ request:
+ $ref: '#/components/schemas/Request'
+ description: The request part of the pair
+ response:
+ $ref: '#/components/schemas/Response'
+ description: The Response part of the pair
+ - $ref: '#/components/schemas/AbstractExchange'
+ OperationOverrideDTO:
+ description: Data Transfer object for grouping the mutable properties of an
+ Operation
+ type: object
+ properties:
+ dispatcher:
+ description: Type of dispatcher to apply for this operation
+ type: string
+ dispatcherRules:
+ description: Rules of dispatcher for this operation
+ type: string
+ defaultDelay:
+ description: Default delay in milliseconds to apply to mock responses on
+ this operation
+ type: integer
+ parameterConstraints:
+ description: Constraints that may apply to incoming parameters on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ ParameterConstraint:
+ description: Companion object for Operation that may be used to express constraints
+ on request parameters
+ required:
+ - name
+ type: object
+ properties:
+ name:
+ description: Parameter name
+ type: string
+ required:
+ description: Whether it's a required constraint
+ type: boolean
+ recopy:
+ description: Whether it's a recopy constraint
+ type: boolean
+ mustMatchRegexp:
+ description: Whether it's a regular expression matching constraint
+ type: string
+ in:
+ description: Parameter location
+ enum:
+ - path
+ - query
+ - header
+ type: string
+ Metadata:
+ description: Commodity object for holding metadata on any entity. This object
+ is inspired by Kubernetes metadata.
+ required:
+ - createdOn
+ - lastUpdate
+ type: object
+ properties:
+ createdOn:
+ description: Creation date of attached object
+ type: number
+ readOnly: true
+ lastUpdate:
+ description: Last update of attached object
+ type: number
+ readOnly: true
+ annotations:
+ description: Annotations of attached object
+ type: object
+ additionalProperties:
+ type: string
+ labels:
+ description: Labels put on attached object
+ type: object
+ additionalProperties:
+ type: string
+ LabelsMap:
+ description: A map which keys are already used labels keys and values are already
+ used values for this key
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/StringArray'
+ type: object
+ UnidirectionalEvent:
+ description: Representation of an unidirectional exchange as an event message
+ type: object
+ allOf:
+ - required:
+ - eventMessage
+ type: object
+ properties:
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Asynchronous message for this unidirectional event
+ - $ref: '#/components/schemas/AbstractExchange'
+ StringArray:
+ description: A simple array of String
+ type: array
+ items:
+ type: string
+ MessageArray:
+ description: Array of Exchanges for Service operations
+ type: array
+ items:
+ $ref: '#/components/schemas/Exchange'
+ Exchange:
+ oneOf:
+ - $ref: '#/components/schemas/RequestResponsePair'
+ - $ref: '#/components/schemas/UnidirectionalEvent'
+ discriminator:
+ propertyName: type
+ mapping:
+ reqRespPair: '#/components/schemas/RequestResponsePair'
+ unidirEvent: '#/components/schemas/UnidirectionalEvent'
+ description: "Abstract representation of a Service or API exchange type (request/response,\
+ \ event based, ...)"
+ AbstractExchange:
+ description: Abstract bean representing a Service or API Exchange.
+ required:
+ - type
+ type: object
+ properties:
+ type:
+ description: Discriminant type for identifying kind of exchange
+ enum:
+ - reqRespPair
+ - unidirEvent
+ type: string
+ ServiceView:
+ description: Aggregate bean for grouping a Service an its messages pairs
+ required:
+ - service
+ - messagesMap
+ type: object
+ properties:
+ service:
+ $ref: '#/components/schemas/Service'
+ description: Wrapped service description
+ messagesMap:
+ description: "Map of messages for this Service. Keys are operation name,\
+ \ values are array of messages for this operation"
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MessageArray'
+ TestRequest:
+ description: Test request is a minimalist wrapper for requesting the launch
+ of a new test
+ required:
+ - serviceId
+ - testEndpoint
+ - runnerType
+ - timeout
+ properties:
+ serviceId:
+ description: Unique identifier of service to test
+ type: string
+ testEndpoint:
+ description: Endpoint to test for this service
+ type: string
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ timeout:
+ format: int64
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ filteredOperations:
+ description: A restriction on service operations to test
+ type: array
+ items:
+ type: string
+ secretName:
+ description: The name of Secret to use for connecting the test endpoint
+ type: string
+ oAuth2Context:
+ $ref: '#/components/schemas/OAuth2ClientContext'
+ description: An OAuth2 context to use for retrieving an access token prior
+ invoking the tested endpoint
+ operationsHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ Resource:
+ description: "Resource represents a Service or API artifacts such as specification,\
+ \ contract"
+ required:
+ - id
+ - name
+ - content
+ - type
+ - serviceId
+ type: object
+ properties:
+ id:
+ description: Uniquer identifier of this Service or API Resource
+ type: string
+ name:
+ description: Unique name/business identifier for this Service or API resource
+ type: string
+ content:
+ description: String content of this resource
+ type: string
+ type:
+ $ref: '#/components/schemas/ResourceType'
+ description: Type of this Service or API resource
+ serviceId:
+ description: Unique identifier of the Servoce or API this resource is attached
+ to
+ type: string
+ path:
+ description: Relative path of this resource regarding main resource
+ type: string
+ sourceArtifact:
+ description: Short name of the artifact this resource was extracted from
+ type: string
+ TestRunnerType:
+ description: Type of test strategy (different strategies are implemented by
+ different runners)
+ enum:
+ - HTTP
+ - SOAP_HTTP
+ - SOAP_UI
+ - POSTMAN
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SCHEMA
+ - GRPC_PROTOBUF
+ - GRAPHQL_SCHEMA
+ type: string
+ Operation:
+ description: An Operation of a Service or API
+ required:
+ - name
+ - method
+ type: object
+ properties:
+ name:
+ description: Unique name of this Operation within Service scope
+ type: string
+ method:
+ description: Represents transport method
+ type: string
+ inputName:
+ description: Name of input parameters in case of Xml based Service
+ type: string
+ outputName:
+ description: Name of output parameters in case of Xml based Service
+ type: string
+ dispatcher:
+ description: Dispatcher strategy used for mocks
+ type: string
+ dispatcherRules:
+ description: DispatcherRules used for mocks
+ type: string
+ defaultDelay:
+ description: Default response time delay for mocks
+ type: number
+ resourcePaths:
+ description: Paths the mocks endpoints are mapped on
+ type: array
+ items:
+ type: string
+ parameterContraints:
+ description: Contraints that may apply to mock invocatino on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ bindings:
+ description: Map of protocol binding details for this operation
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Binding'
+ ArtifactUpload:
+ description: |-
+ Artifact to be imported by Microcks.
+ This structure represents a mime-multipart file upload (as specified here: https://swagger.io/docs/specification/describing-request-body/file-upload/)
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The artifact to upload
+ type: string
+ Counter:
+ description: A simple Counter type.
+ type: object
+ properties:
+ counter:
+ format: int32
+ description: Number of items in a resource collection
+ type: integer
+ example: |-
+ {
+ "counter": 12
+ }
+ FeaturesConfig:
+ title: Root Type for FeaturesConfig
+ description: Representation of optional features configuration used by Microcks
+ server
+ type: object
+ properties:
+ repository-filter:
+ description: Repository filtering feature properties
+ type: object
+ properties:
+ label-label:
+ type: string
+ enabled:
+ type: string
+ label-list:
+ type: string
+ label-key:
+ type: string
+ microcks-hub:
+ description: Microcks Hub feature properties
+ type: object
+ properties:
+ allowed-roles:
+ type: string
+ endpoint:
+ type: string
+ enabled:
+ type: string
+ repository-tenancy:
+ description: Repository tenancy feature properties
+ type: object
+ properties:
+ enabled:
+ type: string
+ artifact-import-allowed-roles:
+ type: string
+ async-api:
+ description: Asynchronous feature properties
+ type: object
+ properties:
+ default-binding:
+ type: string
+ endpoint-MQTT:
+ type: string
+ endpoint-WS:
+ type: string
+ endpoint-KAFKA:
+ type: string
+ endpoint-AMQP:
+ type: string
+ endpoint-NATS:
+ type: string
+ endpoint-GOOGLEPUBSUB:
+ type: string
+ enabled:
+ type: string
+ frequencies:
+ type: string
+ additionalProperties: true
+ example:
+ repository-filter:
+ label-label: Domain
+ enabled: "true"
+ label-list: "domain,status"
+ label-key: domain
+ microcks-hub:
+ allowed-roles: "admin,manager,manager-any"
+ endpoint: https://hub.microcks.io/api
+ enabled: "true"
+ repository-tenancy:
+ enabled: "false"
+ artifact-import-allowed-roles: "admin,manager,manager-any"
+ async-api:
+ default-binding: KAFKA
+ endpoint-MQTT: my-mqtt-broker.apps.try.microcks.io
+ endpoint-WS: localhost:8081
+ endpoint-KAFKA: my-cluster-kafka-bootstrap.apps.try.microcks.io
+ enabled: "false"
+ frequencies: "3,10,30"
+ SnapshotUpload:
+ description: Upload of a repository snapshot file
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The repository snapshot file
+ type: string
+ HeaderDTO:
+ description: Data Transfert Object for headers of both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this header (comma separated strings)
+ type: string
+ OperationHeaders:
+ description: "Specification of additional headers for a Service/API operations.\
+ \ Keys are operation name or \"globals\" (if header applies to all), values\
+ \ are Header objects DTO."
+ type: object
+ additionalProperties:
+ type: array
+ items:
+ $ref: '#/components/schemas/HeaderDTO'
+ Service:
+ description: Represents a Service or API definition as registred into Microcks
+ repository
+ required:
+ - name
+ - version
+ - type
+ - sourceArtifact
+ properties:
+ id:
+ description: Unique identifier for this Service or API
+ type: string
+ name:
+ description: Distinct name for this Service or API (maybe shared among many
+ versions)
+ type: string
+ version:
+ description: Distinct version for a named Service or API
+ type: string
+ type:
+ description: Service or API Type
+ enum:
+ - REST
+ - SOAP_HTTP
+ - GENERIC_REST
+ - GENERIC_EVENT
+ - EVENT
+ - GRPC
+ - GRAPHQL
+ type: string
+ operations:
+ description: Set of Operations for Service or API
+ type: array
+ items:
+ $ref: '#/components/schemas/Operation'
+ xmlNS:
+ description: Associated Xml Namespace in case of Xml based Service
+ type: string
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of Service
+ sourceArtifact:
+ description: Short name of the main/primary artifact this service was created
+ from
+ type: string
+ Trend:
+ description: Evolution trend qualifier
+ enum:
+ - DOWN
+ - LOW_DOWN
+ - STABLE
+ - LOW_UP
+ - UP
+ type: string
+ WeightedMetricValue:
+ description: Value of a metric with an associated weight
+ required:
+ - name
+ - weight
+ - value
+ type: object
+ properties:
+ name:
+ description: Metric name or serie name
+ type: string
+ weight:
+ description: Weight of this metric value (typically a percentage)
+ type: integer
+ value:
+ description: The value of this metric
+ type: integer
+ DailyInvocationStatistic:
+ description: The daily statistic of a service mock invocations
+ required:
+ - id
+ - day
+ - serviceName
+ - serviceVersion
+ - dailyCount
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this statistic object
+ type: string
+ day:
+ description: The day (formatted as yyyyMMdd string) represented by this
+ statistic
+ type: string
+ serviceName:
+ description: The name of the service this statistic is related to
+ type: string
+ serviceVersion:
+ description: The version of the service this statistic is related to
+ type: string
+ dailyCount:
+ description: The number of service mock invocations on this day
+ type: number
+ hourlyCount:
+ description: The number of service mock invocations per hour of the day
+ (keys range from 0 to 23)
+ type: object
+ additionalProperties: true
+ minuteCount:
+ description: The number of service mock invocations per minute of the day
+ (keys range from 0 to 1439)
+ type: object
+ additionalProperties: true
+ TestConformanceMetric:
+ description: "Represents the test conformance metrics (current score, history\
+ \ and evolution trend) of a Service"
+ required:
+ - id
+ - serviceId
+ - currentScore
+ - maxPossibleScore
+ type: object
+ properties:
+ id:
+ description: Unique identifier of coverage metric
+ type: string
+ serviceId:
+ description: Unique identifier of the Service this metric is related to
+ type: string
+ aggregationLabelValue:
+ description: Value of the label used for metrics aggregation (if any)
+ type: string
+ maxPossibleScore:
+ format: double
+ description: Maximum conformance score that can be reached (depends on samples
+ expresiveness)
+ type: number
+ currentScore:
+ format: double
+ description: Current test conformance score for the related Service
+ type: number
+ lastUpdateDay:
+ description: The day of latest score update (in yyyyMMdd format)
+ type: string
+ latestTrend:
+ $ref: '#/components/schemas/Trend'
+ description: Evolution trend of currentScore
+ latestScores:
+ description: "History of latest scores (key is date with format yyyyMMdd,\
+ \ value is score as double)"
+ type: object
+ additionalProperties:
+ type: number
+ TestResultSummary:
+ description: 'Represents the summary result of a Service or API test run by
+ Microcks. '
+ required:
+ - id
+ - testDate
+ - serviceId
+ - success
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ testDate:
+ format: int64
+ description: Timestamp of creation date of this service
+ type: integer
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ TestResult:
+ description: "Represents the result of a Service or API test run by Microcks.\
+ \ Tests are related to a service and made of multiple test cases corresponding\
+ \ to each operations / actions composing service. Tests are run against a\
+ \ specific endpoint named testedEndpoint. It holds global markers telling\
+ \ if test still ran, is a success, how many times is has taken and so on ..."
+ required:
+ - id
+ - version
+ - testNumber
+ - testDate
+ - testedEndpoint
+ - serviceId
+ - success
+ - inProgress
+ - runnerType
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ version:
+ description: Revision number of this test
+ type: number
+ testNumber:
+ description: Incremental number for tracking number of tests of a service
+ type: number
+ testDate:
+ format: int64
+ description: Timestamp of creation date of this service
+ type: integer
+ testedEndpoint:
+ description: Endpoint used during test
+ type: string
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ elapsedTime:
+ description: Elapsed time in milliseconds since test beginning
+ type: number
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ inProgress:
+ description: Flag telling is test is still in progress
+ type: boolean
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ testCaseResults:
+ description: TestCase results associated to this test
+ type: array
+ items:
+ $ref: '#/components/schemas/TestCaseResult'
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: The referrence of the Secret used for connecting to test endpoint
+ operationHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ authorizedClient:
+ $ref: '#/components/schemas/OAuth2AuthorizedClient'
+ description: The OAuth2 authorized client that performed the test
+ Binding:
+ description: Protocol binding details for asynchronous operations
+ required:
+ - type
+ - destinationName
+ type: object
+ properties:
+ type:
+ description: Protocol binding identifier
+ enum:
+ - KAFKA
+ - MQTT
+ - WS
+ - AMQP
+ - NATS
+ - GOOGLEPUBSUB
+ type: string
+ keyType:
+ description: Type of key for Kafka messages
+ type: string
+ destinationType:
+ description: Type of destination for asynchronous messages of this operation
+ type: string
+ destinationName:
+ description: Name of destination for asynchronous messages of this operation
+ type: string
+ qoS:
+ description: Quality of Service attribute for MQTT binding
+ type: string
+ persistent:
+ description: Persistent attribute for MQTT binding
+ type: boolean
+ method:
+ description: HTTP method for WebSocket binding
+ type: string
+ ResourceType:
+ description: Types of managed resources for Services or APIs
+ enum:
+ - WSDL
+ - XSD
+ - JSON_SCHEMA
+ - OPEN_API_SPEC
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SPEC
+ - ASYNC_API_SCHEMA
+ - AVRO_SCHEMA
+ - PROTOBUF_SCHEMA
+ - PROTOBUF_DESCRIPTION
+ - GRAPHQL_SCHEMA
+ - POSTMAN_COLLECTION
+ type: string
+ CounterMap:
+ description: A generic map of counter
+ type: object
+ additionalProperties:
+ type: number
+ OAuth2GrantType:
+ description: Enumeration for the different supported grants/flows of OAuth2
+ enum:
+ - PASSWORD
+ - CLIENT_CREDENTIALS
+ - REFRESH_TOKEN
+ type: string
+ OAuth2AuthorizedClient:
+ description: OAuth2 authorized client that performed a test
+ required:
+ - grantType
+ - principalName
+ - tokenUri
+ type: object
+ properties:
+ grantType:
+ $ref: '#/components/schemas/OAuth2GrantType'
+ description: OAuth2 authorization flow/grant type applied
+ principalName:
+ description: Name of authorized principal (clientId or username in the case
+ of Password grant type)
+ type: string
+ tokenUri:
+ description: Identity Provider URI used for token retrieval
+ type: string
+ scopes:
+ description: Included scopes (separated using space)
+ type: string
+ ArtifactDownload:
+ description: Artifact Download specification to be imported by Microcks.
+ required:
+ - url
+ type: object
+ properties:
+ url:
+ description: The URL of remote artifact to download and import
+ type: string
+ mainArtifact:
+ description: Whether this remote artifact should be imported as main/primary
+ or secondary artifact. Default is true.
+ type: boolean
+ secretName:
+ description: The name of a secret that can be used to authenticated when
+ downloading remote artifact.
+ type: string
+ ImportJob:
+ description: An ImportJob allow defining a repository artifact to poll for discovering
+ Services and APIs mocks and tests
+ required:
+ - name
+ - repositoryUrl
+ properties:
+ id:
+ description: Unique identifier of ImportJob
+ type: string
+ name:
+ description: Unique distinct name of this ImportJob
+ type: string
+ repositoryUrl:
+ description: URL of mocks and tests repository artifact
+ type: string
+ repositoryDisableSSLValidation:
+ description: Whether to disable SSL certificate verification when checking
+ repository
+ type: boolean
+ frequency:
+ description: Reserved for future usage
+ type: string
+ createdDate:
+ format: int64
+ description: Creation timestamp for this ImportJob
+ type: integer
+ lastImportDate:
+ format: int64
+ description: Timestamp of the last import
+ type: integer
+ lastImportError:
+ description: Error message of last import (if any)
+ type: string
+ active:
+ description: Whether this ImportJob is active (ie. scheduled for execution)
+ type: boolean
+ etag:
+ description: Etag of repository URL during previous import. Is used for
+ not re-importing if no recent changes
+ type: string
+ serviceRefs:
+ description: References of Services discovered when checking repository
+ type: array
+ items:
+ $ref: '#/components/schemas/ServiceRef'
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of ImportJob
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: Reference of a Secret to used when checking repository
+ mainArtifact:
+ description: Flag telling if considered as primary or secondary artifact.
+ Default to `true`
+ type: boolean
+ Message:
+ description: "Common structure for Request, Response and EventMessage"
+ required:
+ - name
+ - operationId
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this message
+ type: string
+ name:
+ description: Unique distinct name of this message
+ type: string
+ content:
+ description: Body content for this message
+ type: string
+ operationId:
+ description: Identifier of Operation this message is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this message is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this message
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Request:
+ description: A mock invocation or test request
+ allOf:
+ - type: object
+ properties:
+ responseId:
+ description: Unique identifier of Response this Request is attached
+ type: string
+ queryParameters:
+ description: Query parameters for this Request if any
+ type: array
+ items:
+ $ref: '#/components/schemas/Parameter'
+ - $ref: '#/components/schemas/Message'
+ Response:
+ description: A mock invocation or test response
+ allOf:
+ - type: object
+ properties:
+ status:
+ description: Status of this Response
+ type: string
+ mediaType:
+ description: Content type of this Response
+ type: string
+ dispatchCriteria:
+ description: Dispatch criteria of this Response (in case of a mock)
+ type: string
+ isFault:
+ description: Whether this Response represents a Fault
+ type: boolean
+ - $ref: '#/components/schemas/Message'
+ EventMessage:
+ description: A simple event message published or received in an asynchronous
+ exchange
+ type: object
+ allOf:
+ - required:
+ - id
+ - mediaType
+ type: object
+ properties:
+ mediaType:
+ description: Content type of message
+ type: string
+ dispatchCriteria:
+ description: Dispatch criteria of this message (in case of a mock)
+ type: string
+ - $ref: '#/components/schemas/Message'
+ Parameter:
+ description: Companion objects for Request representing query parameter
+ required:
+ - name
+ - value
+ type: object
+ properties:
+ name:
+ description: The name of the parameter
+ type: string
+ value:
+ description: The value of this parameter
+ type: string
+ OAuth2ClientContext:
+ description: Represents a volatile OAuth2 client context usually associated
+ with a Test request
+ required:
+ - clientId
+ - clientSecret
+ - tokenUri
+ - grantType
+ type: object
+ properties:
+ clientId:
+ description: Id for connecting to OAuth2 identity provider
+ type: string
+ clientSecret:
+ format: password
+ description: Secret for connecting to OAuth2 identity provider
+ type: string
+ tokenUri:
+ description: URI for retrieving an access token from OAuth2 identity provider
+ type: string
+ username:
+ description: Username in case you're using the Resource Owner Password flow
+ type: string
+ password:
+ description: User password in case you're suing the Resource Owner password
+ flow
+ type: string
+ refreshToken:
+ description: Refresh token in case you're using the Refresh Token rotation
+ flow
+ type: string
+ scopes:
+ description: "The OAuth scopes to have in claimed token (delimited by space,\
+ \ \"openid\" is applied by default)"
+ type: string
+ grantType:
+ description: The OAuth2 grant type to apply for retrieving the token
+ enum:
+ - PASSWORD
+ - CLIENT_CREDENTIALS
+ - REFRESH_TOKEN
+ type: string
+ responses:
+ ServiceResponse:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/Service'
+ - $ref: '#/components/schemas/ServiceView'
+ description: ""
+ securitySchemes:
+ jwt-bearer:
+ flows:
+ clientCredentials:
+ tokenUrl: https://keycloak.example.com/realms/microcks/protocol/openid-connect/token
+ refreshUrl: https://keycloak.example.com/realms/microcks/protocol/openid-connect/token
+ scopes:
+ user: Simple authenticated user
+ manager: Services & APIs content manager
+ admin: Administrator of the Microcks instance
+ type: oauth2
+ description: JWT Bearer acquired using OAuth 2 Authentication flow or Direct
+ Access Grant
+security:
+- jwt-bearer: []
+tags:
+- name: mock
+ description: Operations related to API and Services mocks
+- name: test
+ description: Operations related to API and Services tests
+- name: job
+ description: Operations related to Jobs for discovering mocks and tests
+- name: config
+ description: Operations related to configuration
+- name: metrics
+ description: Operations related to metrics
diff --git a/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.2.yaml b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.2.yaml
new file mode 100644
index 000000000..690cc2f06
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.2.yaml
@@ -0,0 +1,1518 @@
+---
+openapi: 3.0.2
+info:
+ title: Microcks API v1.2
+ version: 1.2.0
+ description: "API offered by Microcks, the mock and testing platform for API and\
+ \ microservices (microcks.github.io)"
+ contact:
+ name: Laurent Broudoux
+ url: https://github.com/lbroudoux
+ email: laurent.broudoux@gmail.com
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0
+servers:
+- url: http://microcks.example.com/api
+ description: ""
+paths:
+ /services:
+ summary: This path operations deal with Services
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: page
+ description: Page of Services to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of Services to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServices
+ summary: Get Services and APIs
+ /tests:
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestRequest'
+ required: true
+ tags:
+ - test
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Created TestResult (empty shell cause tests are executed asynchronously)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateTest
+ summary: Create a new Test
+ /services/count:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Services in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServicesCounter
+ summary: Get the Services counter
+ /jobs:
+ summary: This path operations deal with ImportJobs
+ get:
+ tags:
+ - job
+ parameters:
+ - name: page
+ description: Page of ImportJobs to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of ImportJobs to include in a
+ response (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ - name: name
+ description: Name like criterion for query
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ImportJob'
+ description: List of found ImportJobs
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobs
+ summary: Get ImportJobs
+ description: Retrieve a list of ImportJobs
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Created ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateImportJob
+ summary: Create ImportJob
+ description: Create a new ImportJob
+ /jobs/{id}:
+ summary: This path or subpaths operations deal with specific ImportJob having
+ given id
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Found ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ summary: Get ImportJob
+ description: Retrieve an ImportJob using its identifier
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Updated ImportJob
+ summary: Update ImportJob
+ description: Update an ImportJob
+ delete:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: ImportJob deleted
+ security:
+ - jwt-bearer:
+ - user:identity
+ - admin
+ operationId: DeleteImportJob
+ summary: Delete ImportJob
+ description: Delete an ImportJob
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/activate:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: ImportJob is activated
+ security:
+ - jwt-bearer:
+ - user
+ operationId: ActivateImportJob
+ summary: Activate an ImportJob
+ description: "Make an ImportJob active, so that it is executed"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/start:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Started ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: StartImportJob
+ summary: Start an ImportJob
+ description: Starting an ImportJob forces it to immediatly import mock definitions
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/stop:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Stopped ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: StopImportJob
+ summary: Stop an ImportJob
+ description: "Stopping an ImportJob desactivate it, so that it won't execute\
+ \ at next schedule"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: messages
+ description: Whether to include details on services messages into result.
+ Default is false
+ schema:
+ type: boolean
+ in: query
+ responses:
+ "200":
+ $ref: '#/components/responses/ServiceResponse'
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetService
+ summary: Get Service
+ delete:
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: DeleteService
+ summary: Delete Service
+ description: Delete a Service
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /artifact/upload:
+ summary: "Deals with artifacts (SOAP UI project, Postman collection or OpenAPI\
+ \ Specification) to be imported by Microcks."
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/ArtifactUpload'
+ examples:
+ Artifact upload:
+ value: "POST /api/artifact/upload HTTP/1.1\nHost: microcks\nUser-Agent:\
+ \ curl/7.54.0\nAccept: */*\nAuthorization: Bearer \nContent-Length:\
+ \ 2743\nExpect: 100-continue\nContent-Type: multipart/form-data;\
+ \ boundary=------------------------8af8cbb56dd4bde0\n\n--------------------------8af8cbb56dd4bde0\n\
+ Content-Disposition: form-data; name=\"file\"; filename=\"github.json\"\
+ \nContent-Type: application/octet-stream\n\nTHE ARTIFACT HERE\n\n\
+ --------------------------8af8cbb56dd4bde0--\n"
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact was imported and Service found
+ "204":
+ description: No file attribute found in uploaded data
+ "400":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact content is invalid and not understood
+ operationId: uploadArtifact
+ summary: Upload an artifact
+ description: "Uploads an artifact (SOAP UI project, Postman collection or OpenAPI\
+ \ Specification) to be imported by Microcks."
+ /jobs/count:
+ summary: Count ImportJobs
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of ImportJobs in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobCounter
+ summary: Get the ImportJobs counter
+ /secrets:
+ summary: This path operations deal with Secrets
+ get:
+ tags:
+ - config
+ parameters:
+ - name: page
+ description: Page of Secrets to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ required: false
+ - name: size
+ description: Size of a page. Maximum number of Secrets to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ required: false
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Secret'
+ description: List of found Secrets
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecrets
+ summary: Get Secrets
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ tags:
+ - config
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Created Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: CreateSecret
+ summary: Create a new Secret
+ /secrets/{id}:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Found Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetSecret
+ summary: Get Secret
+ description: Retrieve a Secret
+ put:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Updated Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: UpdateSecret
+ summary: Update Secret
+ description: Update a Secret
+ delete:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Secret has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: DeleteSecret
+ summary: Delete Secret
+ description: Delete a Secret
+ parameters:
+ - name: id
+ description: Unique identifier of Secret to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /secrets/count:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Secrets in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecretsCounter
+ summary: Get the Secrets counter
+ /tests/service/{serviceId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResult'
+ description: List of TestResults for the Service having the requested id
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByService
+ summary: Get TestResults by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/service/{serviceId}/count:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of TestResults for this Service in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByServiceCounter
+ summary: Get the TestResults for Service counter
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Requested TestResult
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResult
+ summary: Get TestResult
+ description: ""
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/messages/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RequestResponsePair'
+ description: List of request and response messages for this TestCase
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetMessagesByTestCase
+ summary: Get messages for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/testCaseResult:
+ post:
+ requestBody:
+ description: TestCase return wrapper object
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseReturnDTO'
+ required: true
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseResult'
+ description: TestCaseResult is reported
+ operationId: ReportTestCaseResult
+ summary: Report and create a new TestCaseResult
+ description: Report a TestCaseResult (typically used by a Test runner)
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /keycloak/config:
+ summary: Keycloak Authentification configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KeycloakConfig'
+ description: Get current configuration
+ operationId: GetKeycloakConfig
+ summary: Get authentification configuration
+ /services/{id}/operation:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OperationOverrideDTO'
+ required: true
+ tags:
+ - mock
+ parameters:
+ - name: operationName
+ description: Name of operation to update
+ schema:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ description: Operation has been updated
+ "500":
+ description: Operation cannot be updated
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: OverrideServiceOperation
+ summary: Override Service Operation
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}/metadata:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Metadata'
+ required: true
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service metadata has been updated
+ "500":
+ description: Update of metadata failed
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: UpdateServiceMetadata
+ summary: Update Service Metadata
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/labels:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LabelsMap'
+ description: "Already used labels: keys are label Keys, values are array\
+ \ of label Values"
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetServicesLabels
+ summary: Get the already used labels for Services
+ /services/search:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: queryMap
+ description: Map of criterion. Key can be simply 'name' with value as the
+ searched string. You can also search by label using keys like 'labels.x'
+ where 'x' is the label and value the label value
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services (filtered according search criteria)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: SearchServices
+ summary: Search for Services and APIs
+ /tests/{id}/events/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/UnidirectionalEvent'
+ description: List of event messages for this TestCase
+ operationId: GetEventsByTestCase
+ summary: Get events for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+components:
+ schemas:
+ TestCaseResult:
+ description: Companion objects for TestResult. Each TestCaseResult correspond
+ to a particuliar service operation / action reference by the operationName
+ field. TestCaseResults owns a collection of TestStepResults (one for every
+ request associated to service operation / action).
+ required:
+ - success
+ - elapsedTime
+ - operationName
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test case beginning
+ type: number
+ operationName:
+ description: Name of operation this test case is bound to
+ type: string
+ testStepResults:
+ description: Test steps associated to this test case
+ type: array
+ items:
+ $ref: '#/components/schemas/TestStepResult'
+ Service:
+ description: Represents a Service or API definition as registred into Microcks
+ repository
+ required:
+ - name
+ - version
+ - type
+ properties:
+ id:
+ description: Unique identifier for this Service or API
+ type: string
+ name:
+ description: Distinct name for this Service or API (maybe shared among many
+ versions)
+ type: string
+ version:
+ description: Distinct version for a named Service or API
+ type: string
+ type:
+ description: Service or API Type
+ enum:
+ - REST
+ - SOAP_HTTP
+ - GENERIC_REST
+ - EVENT
+ type: string
+ operations:
+ description: Set of Operations for Service or API
+ type: array
+ items:
+ $ref: '#/components/schemas/Operation'
+ xmlNS:
+ description: Associated Xml Namespace in case of Xml based Service
+ type: string
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of Service
+ ImportJob:
+ description: An ImportJob allow defining a repository artifact to poll for discovering
+ Services and APIs mocks and tests
+ required:
+ - name
+ - repositoryUrl
+ properties:
+ id:
+ description: Unique identifier of ImportJob
+ type: string
+ name:
+ description: Unique distinct name of this ImportJob
+ type: string
+ repositoryUrl:
+ description: URL of mocks and tests repository artifact
+ type: string
+ repositoryDisableSSLValidation:
+ description: Wether to disable SSL certificate verification when checking
+ repository
+ type: boolean
+ frequency:
+ description: Reserved for future usage
+ type: string
+ createdDate:
+ format: date-time
+ description: Creation date for this ImportJob
+ type: string
+ lastImportDate:
+ format: date-time
+ description: Date last import was done
+ type: string
+ lastImportError:
+ description: Error message of last import (if any)
+ type: string
+ active:
+ description: Wether this ImportJob is active (ie. scheduled for execution)
+ type: boolean
+ etag:
+ description: Etag of repository URL during previous import. Is used for
+ not re-importing if no recent changes
+ type: string
+ serviceRefs:
+ description: References of Services discovered when checking repository
+ type: array
+ items:
+ $ref: '#/components/schemas/ServiceRef'
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: Reference of a Secret to used when checking repository
+ ServiceRef:
+ description: Lightweight reference of an existing Service
+ required:
+ - serviceId
+ - name
+ - version
+ properties:
+ serviceId:
+ description: Unique reference of a Service
+ type: string
+ name:
+ description: The Service name
+ type: string
+ version:
+ description: The Service version
+ type: string
+ SecretRef:
+ description: Lightweight reference for an existing Secret
+ required:
+ - secretId
+ - name
+ properties:
+ secretId:
+ description: Unique identifier or referenced Secret
+ type: string
+ name:
+ description: Distinct name of the referenced Secret
+ type: string
+ example: "{\n \"secretId\": \"5be58fb51ed744d1b87481bd\",\n \"name\":\
+ \ \"Gogs internal\"\n}"
+ Secret:
+ description: A Secret allows grouping informations on how to access a restricted
+ resource such as a repsoitory URL. Secrets are typically used by ImpoortJobs.
+ required:
+ - name
+ - description
+ properties:
+ id:
+ description: Unique identifier of Secret
+ type: string
+ name:
+ description: Unique distinct name of Secret
+ type: string
+ username:
+ type: string
+ password:
+ type: string
+ token:
+ type: string
+ tokenHeader:
+ type: string
+ caCertPem:
+ type: string
+ description:
+ description: Description of this Secret
+ type: string
+ example: "{\n \"id\": \"5be58fb51ed744d1b87481bd\",\n \"name\": \"Gogs\
+ \ internal\",\n \"description\": \"Gogs internal corporate repository\"\
+ ,\n \"username\": \"team\",\n \"password\": \"team\",\n \"caCertPem\"\
+ : \"-----BEGIN CERTIFICATE-----\\nMIIC6jCCAdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu\\\
+ nc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIwHhcNMTgwNzE4MTA0ODIyWhcNMjMwNzE3\\nMTA0ODIzWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIw\\\
+ nggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCyaP1jlpnm8WpfCSnUa8Qt\\nhdUynOLLgElUtpWoW25wB9tO2ZmEj+fVsTyzEsW8+nfXXfRsBEzPm2ze9uEMTPTB\\\
+ nAY0k7DbLZfjmF1lCckUvvh1rR/8hoPuXETjXUuOdtm7gRHTOxLQyH2Qi/q0DYJAn\\nprKyRCLa35pRnykL6v4bHkqFnqDEho63i29XHhm2703moh4YCl1iYa2Rh6D44cjn\\\
+ n8lBCq6o7zoZSmc/aBamRkQrfZYcolR8OUtDS4oEB0zMftmea2ycashsLEMB+Cq4r\\n64NI2QM7qOxdTuXsDivHfLl7RTuWEOozGaJXoiPaGU/3d/KnY0gKJ2TC1KXt6Xjn\\\
+ nAgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG\\nSIb3DQEBCwUAA4IBAQCeUmxfUzw0VAFG6HvVYIsfvumiIvsSWmclGIZqNJyfMHFD\\\
+ nMy6xzPRNNfWe5aumGTJsuIzuXfDRcdO7KmH1d2/5brkvWpxp6svVrYPvcoXjl4VN\\nQR2mv5Di4KHfiiwvP3eeewjUZj+uREGqX2fcbJPHTPy32Kpb0H8Uy09BklhjC7QP\\\
+ ngRAGexPhU1oBL/CoOwbHKcQ6dxs/y1SxzI8gXEtec4z62CroI13iT7U0UjSqFBE4\\nKfrJombfz0d68781Z40ll+8my251ZNfbLBhQ3UHW0JnkBEQkE1aBorUoj2iakYvx\\\
+ nA2qZh+8q2b8MwMb2YsQ0dlxKd6c4tN3lmMnO4bnd\\n-----END CERTIFICATE-----\"\n}"
+ ArtifactUpload:
+ title: Root Type for ArtifactUpload
+ description: "Artifact (SOAP UI project, Postman collection or OpenAPI Specification)\
+ \ to be imported by Microcks.\nThis structure represents a mime-multipart\
+ \ file upload (as specified here: https://swagger.io/docs/specification/describing-request-body/file-upload/)"
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The artifact to upload
+ type: string
+ Counter:
+ title: Root Type for Counter
+ description: The root of the Counter type's schema.
+ type: object
+ properties:
+ counter:
+ format: int32
+ description: Number of items in a resource collection
+ type: integer
+ example: "{\n \"counter\": 12\n}"
+ TestCaseReturnDTO:
+ required:
+ - operationName
+ properties:
+ operationName:
+ description: Name of related operation for this TestCase
+ type: string
+ TestReturn:
+ description: TestReturn is used for wrapping the return code of a test step
+ execution
+ required:
+ - code
+ - elapsedTime
+ properties:
+ code:
+ description: "Return code for test (0 means Success, 1 means Failure)"
+ type: integer
+ elapsedTime:
+ format: int64
+ description: Elapsed time in milliseconds
+ type: integer
+ message:
+ description: Error message if any
+ type: string
+ request:
+ $ref: '#/components/schemas/Request'
+ description: Request sent for this test
+ response:
+ $ref: '#/components/schemas/Response'
+ description: Response returned for this test
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Event Message received for this test
+ Request:
+ description: A mock invocation or test request
+ required:
+ - name
+ - operationId
+ properties:
+ id:
+ description: Unique identifier of Request
+ type: string
+ name:
+ description: Unique distinct name of this Request
+ type: string
+ content:
+ description: Body content for this request
+ type: string
+ operationId:
+ description: Identifier of Operation this Request is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Request is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Request
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Response:
+ description: A mock invocation or test response
+ required:
+ - operationId
+ - name
+ properties:
+ operationId:
+ description: Identifier of Operation this Response is associated to
+ type: string
+ content:
+ description: Body content of this Response
+ type: string
+ id:
+ description: Unique identifier of Response
+ type: string
+ name:
+ description: Unique distinct name of this Response
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Response is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Response
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Header:
+ description: Transport headers for both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this Header
+ type: array
+ items:
+ type: string
+ TestStepResult:
+ description: TestStepResult is an entity embedded within TestCaseResult. They
+ are created for each request associated with an operation / action of a microservice.
+ required:
+ - success
+ - elapsedTome
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test step beginning
+ type: number
+ requestName:
+ description: Name of request this test step is bound to
+ type: string
+ message:
+ description: Error message that may be associated to this test step
+ type: string
+ eventMessageName:
+ description: Name of event this test step is bound to
+ type: string
+ KeycloakConfig:
+ description: Representation of Keycloak / SSO configuration used by Microcks
+ server
+ required:
+ - realm
+ - auth-server-url
+ - public-client
+ - ssl-required
+ - resource
+ type: object
+ properties:
+ realm:
+ description: Authentication realm name
+ type: string
+ auth-server-url:
+ description: SSO Server authentication url
+ type: string
+ public-client:
+ description: Name of public-client that can be used for requesting OAuth
+ token
+ type: string
+ ssl-required:
+ description: SSL certificates requirements
+ enum:
+ - none
+ - external
+ resource:
+ description: Name of Keycloak resource/application used on client side
+ type: string
+ RequestResponsePair:
+ description: Request associated with corresponding Response
+ type: object
+ allOf:
+ - required:
+ - request
+ - response
+ type: object
+ properties:
+ request:
+ $ref: '#/components/schemas/Request'
+ description: The request part of the pair
+ response:
+ $ref: '#/components/schemas/Response'
+ description: The Response part of the pair
+ - $ref: '#/components/schemas/AbstractExchange'
+ OperationOverrideDTO:
+ description: Data Transfer object for grouping the mutable properties of an
+ Operation
+ type: object
+ properties:
+ dispatcher:
+ description: Type of dispatcher to apply for this operation
+ type: string
+ dispatcherRules:
+ description: Rules of dispatcher for this operation
+ type: string
+ defaultDelay:
+ description: Default delay in milliseconds to apply to mock responses on
+ this operation
+ type: integer
+ parameterConstraints:
+ description: Constraints that may apply to incoming parameters on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ ParameterConstraint:
+ description: Companion object for Operation that may be used to express constraints
+ on request parameters
+ required:
+ - name
+ type: object
+ properties:
+ name:
+ description: Parameter name
+ type: string
+ required:
+ description: Whether it's a required constraint
+ type: boolean
+ recopy:
+ description: Whether it's a recopy constraint
+ type: boolean
+ mustMatchRegexp:
+ description: Whether it's a regular expression matching constraint
+ type: string
+ in:
+ description: Parameter location
+ enum:
+ - path
+ - query
+ - header
+ type: string
+ Metadata:
+ description: Commodity object for holding metadata on any entity. This object
+ is inspired by Kubernetes metadata.
+ required:
+ - createdOn
+ - lastUpdate
+ type: object
+ properties:
+ createdOn:
+ description: Creation date of attached object
+ type: integer
+ lastUpdate:
+ description: Last update of attached object
+ type: integer
+ annotations:
+ description: Annotations of attached object
+ type: object
+ additionalProperties:
+ type: string
+ labels:
+ description: Labels put on attached object
+ type: object
+ additionalProperties:
+ type: string
+ Binding:
+ description: Protocol binding details for asynchronous operations
+ required:
+ - type
+ - destinationName
+ type: object
+ properties:
+ type:
+ description: Protocol binding identifier
+ enum:
+ - KAFKA
+ - MQTT
+ type: string
+ keyType:
+ description: Type of key for Kafka messages
+ type: string
+ destinationType:
+ description: Type of destination for asynchronous messages of this operation
+ type: string
+ destinationName:
+ description: Name of destination for asynchronous messages of this operation
+ type: string
+ Operation:
+ description: An Operation of a Service or API
+ required:
+ - name
+ - method
+ type: object
+ properties:
+ name:
+ description: Unique name of this Operation within Service scope
+ type: string
+ method:
+ description: Represents transport method
+ type: string
+ inputName:
+ description: Name of input parameters in case of Xml based Service
+ type: string
+ outputName:
+ description: Name of output parameters in case of Xml based Service
+ type: string
+ dispatcher:
+ description: Dispatcher strategy used for mocks
+ type: string
+ dispatcherRules:
+ description: DispactherRules used for mocks
+ type: string
+ defaultDelay:
+ description: Default response time delay for mocks
+ type: number
+ resourcePaths:
+ description: Paths the mocks endpoints are mapped on
+ type: array
+ items:
+ type: string
+ parameterContraints:
+ description: Contraints that may apply to mock invocatino on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ bindings:
+ description: Map of protocol binding details for this operation
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Binding'
+ LabelsMap:
+ description: A map which keys are already used labels keys and values are already
+ used values for this key
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/StringArray'
+ type: object
+ UnidirectionalEvent:
+ description: Representation of an unidirectional exchange as an event message
+ type: object
+ allOf:
+ - required:
+ - eventMessage
+ type: object
+ properties:
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Asynchronous message for this unidirectional event
+ - $ref: '#/components/schemas/AbstractExchange'
+ EventMessage:
+ description: ""
+ required:
+ - id
+ - mediaType
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this message
+ type: string
+ mediaType:
+ description: Content type of message
+ type: string
+ name:
+ description: Unique distinct name of this message
+ type: string
+ content:
+ description: Body content for this message
+ type: string
+ operationId:
+ description: Identifier of Operation this message is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this message is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this message
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ StringArray:
+ description: A simple array of String
+ type: array
+ items:
+ type: string
+ MessageArray:
+ description: Array of Message for Service operations
+ type: array
+ items:
+ $ref: '#/components/schemas/Exchange'
+ Exchange:
+ oneOf:
+ - $ref: '#/components/schemas/RequestResponsePair'
+ - $ref: '#/components/schemas/UnidirectionalEvent'
+ discriminator:
+ propertyName: type
+ mapping:
+ reqRespPair: '#/components/schemas/RequestResponsePair'
+ unidirEvent: '#/components/schemas/UnidirectionalEvent'
+ AbstractExchange:
+ description: Abstract bean representing a Service or API Exchange.
+ required:
+ - type
+ type: object
+ properties:
+ type:
+ description: Discriminant type for identifying kind of exchange
+ enum:
+ - reqRespPair
+ - unidirEvent
+ type: string
+ ServiceView:
+ description: Aggregate bean for grouping a Service an its messages pairs
+ required:
+ - service
+ - messagesMap
+ type: object
+ properties:
+ service:
+ $ref: '#/components/schemas/Service'
+ description: Wrapped service description
+ messagesMap:
+ description: "Map of messages for this Service. Keys are operation name,\
+ \ values are array of messages for this operation"
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MessageArray'
+ TestRunnerType:
+ description: Type of test strategy (different strategies are implemented by
+ different runners)
+ type: array
+ items:
+ enum:
+ - HTTP
+ - SOAP_HTTP
+ - SOAP_UI
+ - POSTMAN
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SCHEMA
+ type: string
+ OperationHeaders:
+ description: "Specification of additional headers for a Service/API operations.\
+ \ Keys are operation name or \"globals\" (if header applies to all), values\
+ \ are Header objects."
+ type: object
+ additionalProperties:
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ TestResult:
+ description: "Represents the result of a Service or API test run by Microcks.\
+ \ Tests are related to a service and made of multiple test cases corresponding\
+ \ to each operations / actions composing service. Tests are run against a\
+ \ specific endpoint named testedEndpoint. It holds global markers telling\
+ \ if test still ran, is a success, how many times is has taken and so on ..."
+ required:
+ - id
+ - version
+ - testNumber
+ - testedEndpoint
+ - serviceId
+ - success
+ - inProgress
+ - runnerType
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ version:
+ description: Revision number of this test
+ type: number
+ testNumber:
+ description: Incremental number for tracking number of tests of a service
+ type: number
+ testedEndpoint:
+ description: Endpoint used during test
+ type: string
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ elapsedTime:
+ description: Elapsed time in milliseconds since test beginning
+ type: number
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ inProgress:
+ description: Flag telling is test is still in progress
+ type: boolean
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ testCaseResults:
+ description: TestCase results associated to this test
+ type: array
+ items:
+ $ref: '#/components/schemas/TestCaseResult'
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: The referrence of the Secret used for connecting to test endpoint
+ operationHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ TestRequest:
+ description: Test request is a minimalist wrapper for requesting the launch
+ of a new test
+ required:
+ - serviceId
+ - testEndpoint
+ - runnerType
+ - timeout
+ properties:
+ serviceId:
+ description: Unique identifier of service to test
+ type: string
+ testEndpoint:
+ description: Endpoint to test for this service
+ type: string
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ filteredOperations:
+ description: A restriction on service operations to test
+ type: array
+ items:
+ type: string
+ operationHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ secretName:
+ description: The name of Secret to use for connecting the test endpoint
+ type: string
+ responses:
+ ServiceResponse:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/Service'
+ - $ref: '#/components/schemas/ServiceView'
+ description: ""
+ securitySchemes:
+ jwt-bearer:
+ flows:
+ clientCredentials:
+ tokenUrl: https://keycloak.example.com/auth/realms/microcks/protocol/openid-connect/token
+ refreshUrl: https://keycloak.example.com/auth/realms/microcks/protocol/openid-connect/token
+ scopes:
+ user: ""
+ manager: ""
+ admin: ""
+ type: oauth2
+ description: JWT Bearer acquired using OAuth 2 Authentication flow or Direct
+ Access Grant
+security:
+- jwt-bearer: []
+tags:
+- name: mock
+ description: Operations related to API and Services mocks
+- name: test
+ description: Operations related to API and Services tests
+- name: job
+ description: Operations related to Jobs for discovering mocks and tests
+- name: config
+ description: Operations related to configuration
diff --git a/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.3.yaml b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.3.yaml
new file mode 100644
index 000000000..9b3f12504
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.3.yaml
@@ -0,0 +1,1634 @@
+---
+openapi: 3.0.2
+info:
+ title: Microcks API v1.3
+ version: 1.3.0
+ description: "API offered by Microcks, the mock and testing platform for API and\
+ \ microservices (microcks.github.io)"
+ contact:
+ name: Laurent Broudoux
+ url: https://github.com/lbroudoux
+ email: laurent.broudoux@gmail.com
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0
+servers:
+- url: http://microcks.example.com/api
+ description: ""
+paths:
+ /services:
+ summary: This path operations deal with Services
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: page
+ description: Page of Services to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of Services to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServices
+ summary: Get Services and APIs
+ /tests:
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestRequest'
+ required: true
+ tags:
+ - test
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Created TestResult (empty shell cause tests are executed asynchronously)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateTest
+ summary: Create a new Test
+ /services/count:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Services in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServicesCounter
+ summary: Get the Services counter
+ /jobs:
+ summary: This path operations deal with ImportJobs
+ get:
+ tags:
+ - job
+ parameters:
+ - name: page
+ description: Page of ImportJobs to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of ImportJobs to include in a
+ response (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ - name: name
+ description: Name like criterion for query
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ImportJob'
+ description: List of found ImportJobs
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobs
+ summary: Get ImportJobs
+ description: Retrieve a list of ImportJobs
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Created ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateImportJob
+ summary: Create ImportJob
+ description: Create a new ImportJob
+ /jobs/{id}:
+ summary: This path or subpaths operations deal with specific ImportJob having
+ given id
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Found ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ summary: Get ImportJob
+ description: Retrieve an ImportJob using its identifier
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Updated ImportJob
+ summary: Update ImportJob
+ description: Update an ImportJob
+ delete:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: ImportJob deleted
+ security:
+ - jwt-bearer:
+ - user:identity
+ - admin
+ operationId: DeleteImportJob
+ summary: Delete ImportJob
+ description: Delete an ImportJob
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/activate:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: ImportJob is activated
+ security:
+ - jwt-bearer:
+ - user
+ operationId: ActivateImportJob
+ summary: Activate an ImportJob
+ description: "Make an ImportJob active, so that it is executed"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/start:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Started ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: StartImportJob
+ summary: Start an ImportJob
+ description: Starting an ImportJob forces it to immediatly import mock definitions
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/stop:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Stopped ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: StopImportJob
+ summary: Stop an ImportJob
+ description: "Stopping an ImportJob desactivate it, so that it won't execute\
+ \ at next schedule"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: messages
+ description: Whether to include details on services messages into result.
+ Default is false
+ schema:
+ type: boolean
+ in: query
+ responses:
+ "200":
+ $ref: '#/components/responses/ServiceResponse'
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetService
+ summary: Get Service
+ delete:
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: DeleteService
+ summary: Delete Service
+ description: Delete a Service
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /artifact/upload:
+ summary: "Deals with artifacts (SOAP UI project, Postman collection or OpenAPI\
+ \ Specification) to be imported by Microcks."
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/ArtifactUpload'
+ examples:
+ Artifact upload:
+ value: "POST /api/artifact/upload HTTP/1.1\nHost: microcks\nUser-Agent:\
+ \ curl/7.54.0\nAccept: */*\nAuthorization: Bearer \nContent-Length:\
+ \ 2743\nExpect: 100-continue\nContent-Type: multipart/form-data;\
+ \ boundary=------------------------8af8cbb56dd4bde0\n\n--------------------------8af8cbb56dd4bde0\n\
+ Content-Disposition: form-data; name=\"file\"; filename=\"github.json\"\
+ \nContent-Type: application/octet-stream\n\nTHE ARTIFACT HERE\n\n\
+ --------------------------8af8cbb56dd4bde0--\n"
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact was imported and Service found
+ "204":
+ description: No file attribute found in uploaded data
+ "400":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact content is invalid and not understood
+ security:
+ - jwt-bearer:
+ - user
+ operationId: uploadArtifact
+ summary: Upload an artifact
+ description: "Uploads an artifact (SOAP UI project, Postman collection or OpenAPI\
+ \ Specification) to be imported by Microcks."
+ /jobs/count:
+ summary: Count ImportJobs
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of ImportJobs in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobCounter
+ summary: Get the ImportJobs counter
+ /secrets:
+ summary: This path operations deal with Secrets
+ get:
+ tags:
+ - config
+ parameters:
+ - name: page
+ description: Page of Secrets to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ required: false
+ - name: size
+ description: Size of a page. Maximum number of Secrets to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ required: false
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Secret'
+ description: List of found Secrets
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecrets
+ summary: Get Secrets
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ tags:
+ - config
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Created Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: CreateSecret
+ summary: Create a new Secret
+ /secrets/{id}:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Found Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetSecret
+ summary: Get Secret
+ description: Retrieve a Secret
+ put:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Updated Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: UpdateSecret
+ summary: Update Secret
+ description: Update a Secret
+ delete:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Secret has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: DeleteSecret
+ summary: Delete Secret
+ description: Delete a Secret
+ parameters:
+ - name: id
+ description: Unique identifier of Secret to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /secrets/count:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Secrets in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecretsCounter
+ summary: Get the Secrets counter
+ /tests/service/{serviceId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResult'
+ description: List of TestResults for the Service having the requested id
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByService
+ summary: Get TestResults by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/service/{serviceId}/count:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of TestResults for this Service in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByServiceCounter
+ summary: Get the TestResults for Service counter
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Requested TestResult
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResult
+ summary: Get TestResult
+ description: ""
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/messages/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RequestResponsePair'
+ description: List of request and response messages for this TestCase
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetMessagesByTestCase
+ summary: Get messages for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/testCaseResult:
+ post:
+ requestBody:
+ description: TestCase return wrapper object
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseReturnDTO'
+ required: true
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseResult'
+ description: TestCaseResult is reported
+ operationId: ReportTestCaseResult
+ summary: Report and create a new TestCaseResult
+ description: Report a TestCaseResult (typically used by a Test runner)
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /keycloak/config:
+ summary: Keycloak Authentification configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KeycloakConfig'
+ description: Get current configuration
+ operationId: GetKeycloakConfig
+ summary: Get authentification configuration
+ /services/{id}/operation:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OperationOverrideDTO'
+ required: true
+ tags:
+ - mock
+ parameters:
+ - name: operationName
+ description: Name of operation to update
+ schema:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ description: Operation has been updated
+ "500":
+ description: Operation cannot be updated
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: OverrideServiceOperation
+ summary: Override Service Operation
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}/metadata:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Metadata'
+ required: true
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service metadata has been updated
+ "500":
+ description: Update of metadata failed
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: UpdateServiceMetadata
+ summary: Update Service Metadata
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/labels:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LabelsMap'
+ description: "Already used labels: keys are label Keys, values are array\
+ \ of label Values"
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetServicesLabels
+ summary: Get the already used labels for Services
+ /services/search:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: queryMap
+ description: Map of criterion. Key can be simply 'name' with value as the
+ searched string. You can also search by label using keys like 'labels.x'
+ where 'x' is the label and value the label value
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services (filtered according search criteria)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: SearchServices
+ summary: Search for Services and APIs
+ /tests/{id}/events/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/UnidirectionalEvent'
+ description: List of event messages for this TestCase
+ operationId: GetEventsByTestCase
+ summary: Get events for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/{name}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Resource'
+ description: Retrieve the resource having this name
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResource
+ summary: Get Resource
+ parameters:
+ - name: name
+ description: Unique name/business identifier of the Service or API resource
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/service/{serviceId}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Resource'
+ description: List the resources attached to a Service or API
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResourcesByService
+ summary: Get Resources by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of the Service or API the resources are attached
+ to
+ schema:
+ type: string
+ in: path
+ required: true
+components:
+ schemas:
+ TestCaseResult:
+ description: Companion objects for TestResult. Each TestCaseResult correspond
+ to a particuliar service operation / action reference by the operationName
+ field. TestCaseResults owns a collection of TestStepResults (one for every
+ request associated to service operation / action).
+ required:
+ - success
+ - elapsedTime
+ - operationName
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test case beginning
+ type: number
+ operationName:
+ description: Name of operation this test case is bound to
+ type: string
+ testStepResults:
+ description: Test steps associated to this test case
+ type: array
+ items:
+ $ref: '#/components/schemas/TestStepResult'
+ Service:
+ description: Represents a Service or API definition as registred into Microcks
+ repository
+ required:
+ - name
+ - version
+ - type
+ properties:
+ id:
+ description: Unique identifier for this Service or API
+ type: string
+ name:
+ description: Distinct name for this Service or API (maybe shared among many
+ versions)
+ type: string
+ version:
+ description: Distinct version for a named Service or API
+ type: string
+ type:
+ description: Service or API Type
+ enum:
+ - REST
+ - SOAP_HTTP
+ - GENERIC_REST
+ - EVENT
+ type: string
+ operations:
+ description: Set of Operations for Service or API
+ type: array
+ items:
+ $ref: '#/components/schemas/Operation'
+ xmlNS:
+ description: Associated Xml Namespace in case of Xml based Service
+ type: string
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of Service
+ ImportJob:
+ description: An ImportJob allow defining a repository artifact to poll for discovering
+ Services and APIs mocks and tests
+ required:
+ - name
+ - repositoryUrl
+ properties:
+ id:
+ description: Unique identifier of ImportJob
+ type: string
+ name:
+ description: Unique distinct name of this ImportJob
+ type: string
+ repositoryUrl:
+ description: URL of mocks and tests repository artifact
+ type: string
+ repositoryDisableSSLValidation:
+ description: Wether to disable SSL certificate verification when checking
+ repository
+ type: boolean
+ frequency:
+ description: Reserved for future usage
+ type: string
+ createdDate:
+ format: date-time
+ description: Creation date for this ImportJob
+ type: string
+ lastImportDate:
+ format: date-time
+ description: Date last import was done
+ type: string
+ lastImportError:
+ description: Error message of last import (if any)
+ type: string
+ active:
+ description: Wether this ImportJob is active (ie. scheduled for execution)
+ type: boolean
+ etag:
+ description: Etag of repository URL during previous import. Is used for
+ not re-importing if no recent changes
+ type: string
+ serviceRefs:
+ description: References of Services discovered when checking repository
+ type: array
+ items:
+ $ref: '#/components/schemas/ServiceRef'
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: Reference of a Secret to used when checking repository
+ mainArtifact:
+ description: Flag telling if considered as primary or secondary artifact.
+ Default to `true`
+ type: boolean
+ ServiceRef:
+ description: Lightweight reference of an existing Service
+ required:
+ - serviceId
+ - name
+ - version
+ properties:
+ serviceId:
+ description: Unique reference of a Service
+ type: string
+ name:
+ description: The Service name
+ type: string
+ version:
+ description: The Service version
+ type: string
+ SecretRef:
+ description: Lightweight reference for an existing Secret
+ required:
+ - secretId
+ - name
+ properties:
+ secretId:
+ description: Unique identifier or referenced Secret
+ type: string
+ name:
+ description: Distinct name of the referenced Secret
+ type: string
+ example: "{\n \"secretId\": \"5be58fb51ed744d1b87481bd\",\n \"name\":\
+ \ \"Gogs internal\"\n}"
+ Secret:
+ description: A Secret allows grouping informations on how to access a restricted
+ resource such as a repsoitory URL. Secrets are typically used by ImpoortJobs.
+ required:
+ - name
+ - description
+ properties:
+ id:
+ description: Unique identifier of Secret
+ type: string
+ name:
+ description: Unique distinct name of Secret
+ type: string
+ username:
+ type: string
+ password:
+ type: string
+ token:
+ type: string
+ tokenHeader:
+ type: string
+ caCertPem:
+ type: string
+ description:
+ description: Description of this Secret
+ type: string
+ example: "{\n \"id\": \"5be58fb51ed744d1b87481bd\",\n \"name\": \"Gogs\
+ \ internal\",\n \"description\": \"Gogs internal corporate repository\"\
+ ,\n \"username\": \"team\",\n \"password\": \"team\",\n \"caCertPem\"\
+ : \"-----BEGIN CERTIFICATE-----\\nMIIC6jCCAdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu\\\
+ nc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIwHhcNMTgwNzE4MTA0ODIyWhcNMjMwNzE3\\nMTA0ODIzWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIw\\\
+ nggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCyaP1jlpnm8WpfCSnUa8Qt\\nhdUynOLLgElUtpWoW25wB9tO2ZmEj+fVsTyzEsW8+nfXXfRsBEzPm2ze9uEMTPTB\\\
+ nAY0k7DbLZfjmF1lCckUvvh1rR/8hoPuXETjXUuOdtm7gRHTOxLQyH2Qi/q0DYJAn\\nprKyRCLa35pRnykL6v4bHkqFnqDEho63i29XHhm2703moh4YCl1iYa2Rh6D44cjn\\\
+ n8lBCq6o7zoZSmc/aBamRkQrfZYcolR8OUtDS4oEB0zMftmea2ycashsLEMB+Cq4r\\n64NI2QM7qOxdTuXsDivHfLl7RTuWEOozGaJXoiPaGU/3d/KnY0gKJ2TC1KXt6Xjn\\\
+ nAgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG\\nSIb3DQEBCwUAA4IBAQCeUmxfUzw0VAFG6HvVYIsfvumiIvsSWmclGIZqNJyfMHFD\\\
+ nMy6xzPRNNfWe5aumGTJsuIzuXfDRcdO7KmH1d2/5brkvWpxp6svVrYPvcoXjl4VN\\nQR2mv5Di4KHfiiwvP3eeewjUZj+uREGqX2fcbJPHTPy32Kpb0H8Uy09BklhjC7QP\\\
+ ngRAGexPhU1oBL/CoOwbHKcQ6dxs/y1SxzI8gXEtec4z62CroI13iT7U0UjSqFBE4\\nKfrJombfz0d68781Z40ll+8my251ZNfbLBhQ3UHW0JnkBEQkE1aBorUoj2iakYvx\\\
+ nA2qZh+8q2b8MwMb2YsQ0dlxKd6c4tN3lmMnO4bnd\\n-----END CERTIFICATE-----\"\n}"
+ ArtifactUpload:
+ title: Root Type for ArtifactUpload
+ description: "Artifact (SOAP UI project, Postman collection or OpenAPI Specification)\
+ \ to be imported by Microcks.\nThis structure represents a mime-multipart\
+ \ file upload (as specified here: https://swagger.io/docs/specification/describing-request-body/file-upload/)"
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The artifact to upload
+ type: string
+ mainArtifact:
+ description: Flag telling if this should be considered as primary or secondary
+ artifact. Default to 'true'
+ type: boolean
+ Counter:
+ title: Root Type for Counter
+ description: The root of the Counter type's schema.
+ type: object
+ properties:
+ counter:
+ format: int32
+ description: Number of items in a resource collection
+ type: integer
+ example: "{\n \"counter\": 12\n}"
+ TestCaseReturnDTO:
+ required:
+ - operationName
+ properties:
+ operationName:
+ description: Name of related operation for this TestCase
+ type: string
+ TestReturn:
+ description: TestReturn is used for wrapping the return code of a test step
+ execution
+ required:
+ - code
+ - elapsedTime
+ properties:
+ code:
+ description: "Return code for test (0 means Success, 1 means Failure)"
+ type: integer
+ elapsedTime:
+ format: int64
+ description: Elapsed time in milliseconds
+ type: integer
+ message:
+ description: Error message if any
+ type: string
+ request:
+ $ref: '#/components/schemas/Request'
+ description: Request sent for this test
+ response:
+ $ref: '#/components/schemas/Response'
+ description: Response returned for this test
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Event Message received for this test
+ Request:
+ description: A mock invocation or test request
+ required:
+ - name
+ - operationId
+ properties:
+ id:
+ description: Unique identifier of Request
+ type: string
+ name:
+ description: Unique distinct name of this Request
+ type: string
+ content:
+ description: Body content for this request
+ type: string
+ operationId:
+ description: Identifier of Operation this Request is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Request is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Request
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Response:
+ description: A mock invocation or test response
+ required:
+ - operationId
+ - name
+ properties:
+ operationId:
+ description: Identifier of Operation this Response is associated to
+ type: string
+ content:
+ description: Body content of this Response
+ type: string
+ id:
+ description: Unique identifier of Response
+ type: string
+ name:
+ description: Unique distinct name of this Response
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Response is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Response
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Header:
+ description: Transport headers for both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this Header
+ type: array
+ items:
+ type: string
+ TestStepResult:
+ description: TestStepResult is an entity embedded within TestCaseResult. They
+ are created for each request associated with an operation / action of a microservice.
+ required:
+ - success
+ - elapsedTome
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test step beginning
+ type: number
+ requestName:
+ description: Name of request this test step is bound to
+ type: string
+ message:
+ description: Error message that may be associated to this test step
+ type: string
+ eventMessageName:
+ description: Name of event this test step is bound to
+ type: string
+ KeycloakConfig:
+ description: Representation of Keycloak / SSO configuration used by Microcks
+ server
+ required:
+ - realm
+ - auth-server-url
+ - public-client
+ - ssl-required
+ - resource
+ type: object
+ properties:
+ realm:
+ description: Authentication realm name
+ type: string
+ auth-server-url:
+ description: SSO Server authentication url
+ type: string
+ public-client:
+ description: Name of public-client that can be used for requesting OAuth
+ token
+ type: string
+ ssl-required:
+ description: SSL certificates requirements
+ enum:
+ - none
+ - external
+ resource:
+ description: Name of Keycloak resource/application used on client side
+ type: string
+ RequestResponsePair:
+ description: Request associated with corresponding Response
+ type: object
+ allOf:
+ - required:
+ - request
+ - response
+ type: object
+ properties:
+ request:
+ $ref: '#/components/schemas/Request'
+ description: The request part of the pair
+ response:
+ $ref: '#/components/schemas/Response'
+ description: The Response part of the pair
+ - $ref: '#/components/schemas/AbstractExchange'
+ OperationOverrideDTO:
+ description: Data Transfer object for grouping the mutable properties of an
+ Operation
+ type: object
+ properties:
+ dispatcher:
+ description: Type of dispatcher to apply for this operation
+ type: string
+ dispatcherRules:
+ description: Rules of dispatcher for this operation
+ type: string
+ defaultDelay:
+ description: Default delay in milliseconds to apply to mock responses on
+ this operation
+ type: integer
+ parameterConstraints:
+ description: Constraints that may apply to incoming parameters on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ ParameterConstraint:
+ description: Companion object for Operation that may be used to express constraints
+ on request parameters
+ required:
+ - name
+ type: object
+ properties:
+ name:
+ description: Parameter name
+ type: string
+ required:
+ description: Whether it's a required constraint
+ type: boolean
+ recopy:
+ description: Whether it's a recopy constraint
+ type: boolean
+ mustMatchRegexp:
+ description: Whether it's a regular expression matching constraint
+ type: string
+ in:
+ description: Parameter location
+ enum:
+ - path
+ - query
+ - header
+ type: string
+ Metadata:
+ description: Commodity object for holding metadata on any entity. This object
+ is inspired by Kubernetes metadata.
+ required:
+ - createdOn
+ - lastUpdate
+ type: object
+ properties:
+ createdOn:
+ description: Creation date of attached object
+ type: integer
+ lastUpdate:
+ description: Last update of attached object
+ type: integer
+ annotations:
+ description: Annotations of attached object
+ type: object
+ additionalProperties:
+ type: string
+ labels:
+ description: Labels put on attached object
+ type: object
+ additionalProperties:
+ type: string
+ Operation:
+ description: An Operation of a Service or API
+ required:
+ - name
+ - method
+ type: object
+ properties:
+ name:
+ description: Unique name of this Operation within Service scope
+ type: string
+ method:
+ description: Represents transport method
+ type: string
+ inputName:
+ description: Name of input parameters in case of Xml based Service
+ type: string
+ outputName:
+ description: Name of output parameters in case of Xml based Service
+ type: string
+ dispatcher:
+ description: Dispatcher strategy used for mocks
+ type: string
+ dispatcherRules:
+ description: DispactherRules used for mocks
+ type: string
+ defaultDelay:
+ description: Default response time delay for mocks
+ type: number
+ resourcePaths:
+ description: Paths the mocks endpoints are mapped on
+ type: array
+ items:
+ type: string
+ parameterContraints:
+ description: Contraints that may apply to mock invocatino on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ bindings:
+ description: Map of protocol binding details for this operation
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Binding'
+ LabelsMap:
+ description: A map which keys are already used labels keys and values are already
+ used values for this key
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/StringArray'
+ type: object
+ UnidirectionalEvent:
+ description: Representation of an unidirectional exchange as an event message
+ type: object
+ allOf:
+ - required:
+ - eventMessage
+ type: object
+ properties:
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Asynchronous message for this unidirectional event
+ - $ref: '#/components/schemas/AbstractExchange'
+ EventMessage:
+ description: ""
+ required:
+ - id
+ - mediaType
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this message
+ type: string
+ mediaType:
+ description: Content type of message
+ type: string
+ name:
+ description: Unique distinct name of this message
+ type: string
+ content:
+ description: Body content for this message
+ type: string
+ operationId:
+ description: Identifier of Operation this message is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this message is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this message
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ StringArray:
+ description: A simple array of String
+ type: array
+ items:
+ type: string
+ MessageArray:
+ description: Array of Message for Service operations
+ type: array
+ items:
+ $ref: '#/components/schemas/Exchange'
+ Exchange:
+ oneOf:
+ - $ref: '#/components/schemas/RequestResponsePair'
+ - $ref: '#/components/schemas/UnidirectionalEvent'
+ discriminator:
+ propertyName: type
+ mapping:
+ reqRespPair: '#/components/schemas/RequestResponsePair'
+ unidirEvent: '#/components/schemas/UnidirectionalEvent'
+ AbstractExchange:
+ description: Abstract bean representing a Service or API Exchange.
+ required:
+ - type
+ type: object
+ properties:
+ type:
+ description: Discriminant type for identifying kind of exchange
+ enum:
+ - reqRespPair
+ - unidirEvent
+ type: string
+ ServiceView:
+ description: Aggregate bean for grouping a Service an its messages pairs
+ required:
+ - service
+ - messagesMap
+ type: object
+ properties:
+ service:
+ $ref: '#/components/schemas/Service'
+ description: Wrapped service description
+ messagesMap:
+ description: "Map of messages for this Service. Keys are operation name,\
+ \ values are array of messages for this operation"
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MessageArray'
+ OperationHeaders:
+ description: "Specification of additional headers for a Service/API operations.\
+ \ Keys are operation name or \"globals\" (if header applies to all), values\
+ \ are Header objects."
+ type: object
+ additionalProperties:
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ TestResult:
+ description: "Represents the result of a Service or API test run by Microcks.\
+ \ Tests are related to a service and made of multiple test cases corresponding\
+ \ to each operations / actions composing service. Tests are run against a\
+ \ specific endpoint named testedEndpoint. It holds global markers telling\
+ \ if test still ran, is a success, how many times is has taken and so on ..."
+ required:
+ - id
+ - version
+ - testNumber
+ - testedEndpoint
+ - serviceId
+ - success
+ - inProgress
+ - runnerType
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ version:
+ description: Revision number of this test
+ type: number
+ testNumber:
+ description: Incremental number for tracking number of tests of a service
+ type: number
+ testedEndpoint:
+ description: Endpoint used during test
+ type: string
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ elapsedTime:
+ description: Elapsed time in milliseconds since test beginning
+ type: number
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ inProgress:
+ description: Flag telling is test is still in progress
+ type: boolean
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ testCaseResults:
+ description: TestCase results associated to this test
+ type: array
+ items:
+ $ref: '#/components/schemas/TestCaseResult'
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: The referrence of the Secret used for connecting to test endpoint
+ operationHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ TestRequest:
+ description: Test request is a minimalist wrapper for requesting the launch
+ of a new test
+ required:
+ - serviceId
+ - testEndpoint
+ - runnerType
+ - timeout
+ properties:
+ serviceId:
+ description: Unique identifier of service to test
+ type: string
+ testEndpoint:
+ description: Endpoint to test for this service
+ type: string
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ filteredOperations:
+ description: A restriction on service operations to test
+ type: array
+ items:
+ type: string
+ operationHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ secretName:
+ description: The name of Secret to use for connecting the test endpoint
+ type: string
+ TestRunnerType:
+ description: Type of test strategy (different strategies are implemented by
+ different runners)
+ type: array
+ items:
+ enum:
+ - HTTP
+ - SOAP_HTTP
+ - SOAP_UI
+ - POSTMAN
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SCHEMA
+ - GRPC_PROTOBUF
+ type: string
+ Resource:
+ description: "Resource represents a Service or API artifacts such as specification,\
+ \ contract"
+ required:
+ - id
+ - name
+ - content
+ - type
+ - serviceId
+ type: object
+ properties:
+ id:
+ description: Uniquer identifier of this Service or API Resource
+ type: string
+ name:
+ description: Unique name/business identifier for this Service or API resource
+ type: string
+ content:
+ description: String content of this resource
+ type: string
+ type:
+ $ref: '#/components/schemas/ResourceType'
+ description: Type of this Service or API resource
+ serviceId:
+ description: Unique identifier of the Servoce or API this resource is attached
+ to
+ type: string
+ path:
+ description: Relatvie path of this resource regarding main resource
+ type: string
+ sourceArtifact:
+ description: Short name of the artifact this resource was extracted from
+ type: string
+ ResourceType:
+ description: Types of managed resources for Services or APIs
+ type: array
+ items:
+ enum:
+ - WSDL
+ - XSD
+ - JSON_SCHEMA
+ - OPEN_API_SPEC
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SPEC
+ - ASYNC_API_SCHEMA
+ - AVRO_SCHEMA
+ - PROTOBUF_SCHEMA
+ - PROTOBUF_DESCRIPTION
+ type: string
+ Binding:
+ description: Protocol binding details for asynchronous operations
+ required:
+ - type
+ - destinationName
+ type: object
+ properties:
+ type:
+ description: Protocol binding identifier
+ enum:
+ - KAFKA
+ - MQTT
+ - WS
+ type: string
+ keyType:
+ description: Type of key for Kafka messages
+ type: string
+ destinationType:
+ description: Type of destination for asynchronous messages of this operation
+ type: string
+ destinationName:
+ description: Name of destination for asynchronous messages of this operation
+ type: string
+ qoS:
+ description: Quality of Service attribute for MQTT binding
+ type: string
+ persistent:
+ description: Persistent attribute for MQTT binding
+ type: boolean
+ method:
+ description: HTTP method for WebSocket binding
+ type: string
+ responses:
+ ServiceResponse:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/Service'
+ - $ref: '#/components/schemas/ServiceView'
+ description: ""
+ securitySchemes:
+ jwt-bearer:
+ flows:
+ clientCredentials:
+ tokenUrl: https://keycloak.example.com/auth/realms/microcks/protocol/openid-connect/token
+ refreshUrl: https://keycloak.example.com/auth/realms/microcks/protocol/openid-connect/token
+ scopes:
+ user: ""
+ manager: ""
+ admin: ""
+ type: oauth2
+ description: JWT Bearer acquired using OAuth 2 Authentication flow or Direct
+ Access Grant
+security:
+- jwt-bearer: []
+tags:
+- name: mock
+ description: Operations related to API and Services mocks
+- name: test
+ description: Operations related to API and Services tests
+- name: job
+ description: Operations related to Jobs for discovering mocks and tests
+- name: config
+ description: Operations related to configuration
diff --git a/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.4.yaml b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.4.yaml
new file mode 100644
index 000000000..759795a74
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.4.yaml
@@ -0,0 +1,1651 @@
+---
+openapi: 3.0.2
+info:
+ title: Microcks API v1.4
+ version: 1.4.0
+ description: "API offered by Microcks, the mock and testing platform for API and\
+ \ microservices (microcks.github.io)"
+ contact:
+ name: Laurent Broudoux
+ url: https://github.com/lbroudoux
+ email: laurent.broudoux@gmail.com
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0
+servers:
+- url: http://microcks.example.com/api
+ description: ""
+paths:
+ /services:
+ summary: This path operations deal with Services
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: page
+ description: Page of Services to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of Services to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServices
+ summary: Get Services and APIs
+ /tests:
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestRequest'
+ required: true
+ tags:
+ - test
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Created TestResult (empty shell cause tests are executed asynchronously)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateTest
+ summary: Create a new Test
+ /services/count:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Services in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServicesCounter
+ summary: Get the Services counter
+ /jobs:
+ summary: This path operations deal with ImportJobs
+ get:
+ tags:
+ - job
+ parameters:
+ - name: page
+ description: Page of ImportJobs to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of ImportJobs to include in a
+ response (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ - name: name
+ description: Name like criterion for query
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ImportJob'
+ description: List of found ImportJobs
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobs
+ summary: Get ImportJobs
+ description: Retrieve a list of ImportJobs
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Created ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateImportJob
+ summary: Create ImportJob
+ description: Create a new ImportJob
+ /jobs/{id}:
+ summary: This path or subpaths operations deal with specific ImportJob having
+ given id
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Found ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ summary: Get ImportJob
+ description: Retrieve an ImportJob using its identifier
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Updated ImportJob
+ summary: Update ImportJob
+ description: Update an ImportJob
+ delete:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: ImportJob deleted
+ security:
+ - jwt-bearer:
+ - user:identity
+ - admin
+ operationId: DeleteImportJob
+ summary: Delete ImportJob
+ description: Delete an ImportJob
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/activate:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: ImportJob is activated
+ security:
+ - jwt-bearer:
+ - user
+ operationId: ActivateImportJob
+ summary: Activate an ImportJob
+ description: "Make an ImportJob active, so that it is executed"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/start:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Started ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: StartImportJob
+ summary: Start an ImportJob
+ description: Starting an ImportJob forces it to immediatly import mock definitions
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/stop:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Stopped ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: StopImportJob
+ summary: Stop an ImportJob
+ description: "Stopping an ImportJob desactivate it, so that it won't execute\
+ \ at next schedule"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: messages
+ description: Whether to include details on services messages into result.
+ Default is false
+ schema:
+ type: boolean
+ in: query
+ responses:
+ "200":
+ $ref: '#/components/responses/ServiceResponse'
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetService
+ summary: Get Service
+ delete:
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: DeleteService
+ summary: Delete Service
+ description: Delete a Service
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /artifact/upload:
+ summary: "Deals with artifacts (SOAP UI project, Postman collection or OpenAPI\
+ \ Specification) to be imported by Microcks."
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/ArtifactUpload'
+ examples:
+ Artifact upload:
+ value: |
+ POST /api/artifact/upload HTTP/1.1
+ Host: microcks
+ User-Agent: curl/7.54.0
+ Accept: */*
+ Authorization: Bearer
+ Content-Length: 2743
+ Expect: 100-continue
+ Content-Type: multipart/form-data; boundary=------------------------8af8cbb56dd4bde0
+
+ --------------------------8af8cbb56dd4bde0
+ Content-Disposition: form-data; name="file"; filename="github.json"
+ Content-Type: application/octet-stream
+
+ THE ARTIFACT HERE
+
+ --------------------------8af8cbb56dd4bde0--
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact was imported and Service found
+ "204":
+ description: No file attribute found in uploaded data
+ "400":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact content is invalid and not understood
+ security:
+ - jwt-bearer:
+ - user
+ operationId: uploadArtifact
+ summary: Upload an artifact
+ description: "Uploads an artifact (SOAP UI project, Postman collection or OpenAPI\
+ \ Specification) to be imported by Microcks."
+ /jobs/count:
+ summary: Count ImportJobs
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of ImportJobs in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobCounter
+ summary: Get the ImportJobs counter
+ /secrets:
+ summary: This path operations deal with Secrets
+ get:
+ tags:
+ - config
+ parameters:
+ - name: page
+ description: Page of Secrets to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ required: false
+ - name: size
+ description: Size of a page. Maximum number of Secrets to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ required: false
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Secret'
+ description: List of found Secrets
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecrets
+ summary: Get Secrets
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ tags:
+ - config
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Created Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: CreateSecret
+ summary: Create a new Secret
+ /secrets/{id}:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Found Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetSecret
+ summary: Get Secret
+ description: Retrieve a Secret
+ put:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Updated Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: UpdateSecret
+ summary: Update Secret
+ description: Update a Secret
+ delete:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Secret has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: DeleteSecret
+ summary: Delete Secret
+ description: Delete a Secret
+ parameters:
+ - name: id
+ description: Unique identifier of Secret to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /secrets/count:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Secrets in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecretsCounter
+ summary: Get the Secrets counter
+ /tests/service/{serviceId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResult'
+ description: List of TestResults for the Service having the requested id
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByService
+ summary: Get TestResults by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/service/{serviceId}/count:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of TestResults for this Service in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByServiceCounter
+ summary: Get the TestResults for Service counter
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Requested TestResult
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResult
+ summary: Get TestResult
+ description: ""
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/messages/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RequestResponsePair'
+ description: List of request and response messages for this TestCase
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetMessagesByTestCase
+ summary: Get messages for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/testCaseResult:
+ post:
+ requestBody:
+ description: TestCase return wrapper object
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseReturnDTO'
+ required: true
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseResult'
+ description: TestCaseResult is reported
+ operationId: ReportTestCaseResult
+ summary: Report and create a new TestCaseResult
+ description: Report a TestCaseResult (typically used by a Test runner)
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /keycloak/config:
+ summary: Keycloak Authentification configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KeycloakConfig'
+ description: Get current configuration
+ operationId: GetKeycloakConfig
+ summary: Get authentification configuration
+ /services/{id}/operation:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OperationOverrideDTO'
+ required: true
+ tags:
+ - mock
+ parameters:
+ - name: operationName
+ description: Name of operation to update
+ schema:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ description: Operation has been updated
+ "500":
+ description: Operation cannot be updated
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: OverrideServiceOperation
+ summary: Override Service Operation
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}/metadata:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Metadata'
+ required: true
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service metadata has been updated
+ "500":
+ description: Update of metadata failed
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: UpdateServiceMetadata
+ summary: Update Service Metadata
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/labels:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LabelsMap'
+ description: "Already used labels: keys are label Keys, values are array\
+ \ of label Values"
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetServicesLabels
+ summary: Get the already used labels for Services
+ /services/search:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: queryMap
+ description: Map of criterion. Key can be simply 'name' with value as the
+ searched string. You can also search by label using keys like 'labels.x'
+ where 'x' is the label and value the label value
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services (filtered according search criteria)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: SearchServices
+ summary: Search for Services and APIs
+ /tests/{id}/events/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/UnidirectionalEvent'
+ description: List of event messages for this TestCase
+ operationId: GetEventsByTestCase
+ summary: Get events for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/{name}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Resource'
+ description: Retrieve the resource having this name
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResource
+ summary: Get Resource
+ parameters:
+ - name: name
+ description: Unique name/business identifier of the Service or API resource
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/service/{serviceId}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Resource'
+ description: List the resources attached to a Service or API
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResourcesByService
+ summary: Get Resources by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of the Service or API the resources are attached
+ to
+ schema:
+ type: string
+ in: path
+ required: true
+components:
+ schemas:
+ TestCaseResult:
+ description: Companion objects for TestResult. Each TestCaseResult correspond
+ to a particuliar service operation / action reference by the operationName
+ field. TestCaseResults owns a collection of TestStepResults (one for every
+ request associated to service operation / action).
+ required:
+ - success
+ - elapsedTime
+ - operationName
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test case beginning
+ type: number
+ operationName:
+ description: Name of operation this test case is bound to
+ type: string
+ testStepResults:
+ description: Test steps associated to this test case
+ type: array
+ items:
+ $ref: '#/components/schemas/TestStepResult'
+ ServiceRef:
+ description: Lightweight reference of an existing Service
+ required:
+ - serviceId
+ - name
+ - version
+ properties:
+ serviceId:
+ description: Unique reference of a Service
+ type: string
+ name:
+ description: The Service name
+ type: string
+ version:
+ description: The Service version
+ type: string
+ SecretRef:
+ description: Lightweight reference for an existing Secret
+ required:
+ - secretId
+ - name
+ properties:
+ secretId:
+ description: Unique identifier or referenced Secret
+ type: string
+ name:
+ description: Distinct name of the referenced Secret
+ type: string
+ example: |-
+ {
+ "secretId": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal"
+ }
+ Secret:
+ description: A Secret allows grouping informations on how to access a restricted
+ resource such as a repsoitory URL. Secrets are typically used by ImpoortJobs.
+ required:
+ - name
+ - description
+ properties:
+ id:
+ description: Unique identifier of Secret
+ type: string
+ name:
+ description: Unique distinct name of Secret
+ type: string
+ username:
+ type: string
+ password:
+ type: string
+ token:
+ type: string
+ tokenHeader:
+ type: string
+ caCertPem:
+ type: string
+ description:
+ description: Description of this Secret
+ type: string
+ example: |-
+ {
+ "id": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal",
+ "description": "Gogs internal corporate repository",
+ "username": "team",
+ "password": "team",
+ "caCertPem": "-----BEGIN CERTIFICATE-----\nMIIC6jCCAdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu\nc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIwHhcNMTgwNzE4MTA0ODIyWhcNMjMwNzE3\nMTA0ODIzWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIw\nggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCyaP1jlpnm8WpfCSnUa8Qt\nhdUynOLLgElUtpWoW25wB9tO2ZmEj+fVsTyzEsW8+nfXXfRsBEzPm2ze9uEMTPTB\nAY0k7DbLZfjmF1lCckUvvh1rR/8hoPuXETjXUuOdtm7gRHTOxLQyH2Qi/q0DYJAn\nprKyRCLa35pRnykL6v4bHkqFnqDEho63i29XHhm2703moh4YCl1iYa2Rh6D44cjn\n8lBCq6o7zoZSmc/aBamRkQrfZYcolR8OUtDS4oEB0zMftmea2ycashsLEMB+Cq4r\n64NI2QM7qOxdTuXsDivHfLl7RTuWEOozGaJXoiPaGU/3d/KnY0gKJ2TC1KXt6Xjn\nAgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG\nSIb3DQEBCwUAA4IBAQCeUmxfUzw0VAFG6HvVYIsfvumiIvsSWmclGIZqNJyfMHFD\nMy6xzPRNNfWe5aumGTJsuIzuXfDRcdO7KmH1d2/5brkvWpxp6svVrYPvcoXjl4VN\nQR2mv5Di4KHfiiwvP3eeewjUZj+uREGqX2fcbJPHTPy32Kpb0H8Uy09BklhjC7QP\ngRAGexPhU1oBL/CoOwbHKcQ6dxs/y1SxzI8gXEtec4z62CroI13iT7U0UjSqFBE4\nKfrJombfz0d68781Z40ll+8my251ZNfbLBhQ3UHW0JnkBEQkE1aBorUoj2iakYvx\nA2qZh+8q2b8MwMb2YsQ0dlxKd6c4tN3lmMnO4bnd\n-----END CERTIFICATE-----"
+ }
+ ArtifactUpload:
+ title: Root Type for ArtifactUpload
+ description: |-
+ Artifact (SOAP UI project, Postman collection or OpenAPI Specification) to be imported by Microcks.
+ This structure represents a mime-multipart file upload (as specified here: https://swagger.io/docs/specification/describing-request-body/file-upload/)
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The artifact to upload
+ type: string
+ mainArtifact:
+ description: Flag telling if this should be considered as primary or secondary
+ artifact. Default to 'true'
+ type: boolean
+ Counter:
+ title: Root Type for Counter
+ description: The root of the Counter type's schema.
+ type: object
+ properties:
+ counter:
+ format: int32
+ description: Number of items in a resource collection
+ type: integer
+ example: |-
+ {
+ "counter": 12
+ }
+ TestCaseReturnDTO:
+ required:
+ - operationName
+ properties:
+ operationName:
+ description: Name of related operation for this TestCase
+ type: string
+ TestReturn:
+ description: TestReturn is used for wrapping the return code of a test step
+ execution
+ required:
+ - code
+ - elapsedTime
+ properties:
+ code:
+ description: "Return code for test (0 means Success, 1 means Failure)"
+ type: integer
+ elapsedTime:
+ format: int64
+ description: Elapsed time in milliseconds
+ type: integer
+ message:
+ description: Error message if any
+ type: string
+ request:
+ $ref: '#/components/schemas/Request'
+ description: Request sent for this test
+ response:
+ $ref: '#/components/schemas/Response'
+ description: Response returned for this test
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Event Message received for this test
+ Request:
+ description: A mock invocation or test request
+ required:
+ - name
+ - operationId
+ properties:
+ id:
+ description: Unique identifier of Request
+ type: string
+ name:
+ description: Unique distinct name of this Request
+ type: string
+ content:
+ description: Body content for this request
+ type: string
+ operationId:
+ description: Identifier of Operation this Request is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Request is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Request
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Response:
+ description: A mock invocation or test response
+ required:
+ - operationId
+ - name
+ properties:
+ operationId:
+ description: Identifier of Operation this Response is associated to
+ type: string
+ content:
+ description: Body content of this Response
+ type: string
+ id:
+ description: Unique identifier of Response
+ type: string
+ name:
+ description: Unique distinct name of this Response
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Response is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Response
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Header:
+ description: Transport headers for both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this Header
+ type: array
+ items:
+ type: string
+ TestStepResult:
+ description: TestStepResult is an entity embedded within TestCaseResult. They
+ are created for each request associated with an operation / action of a microservice.
+ required:
+ - success
+ - elapsedTome
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test step beginning
+ type: number
+ requestName:
+ description: Name of request this test step is bound to
+ type: string
+ message:
+ description: Error message that may be associated to this test step
+ type: string
+ eventMessageName:
+ description: Name of event this test step is bound to
+ type: string
+ KeycloakConfig:
+ description: Representation of Keycloak / SSO configuration used by Microcks
+ server
+ required:
+ - realm
+ - auth-server-url
+ - public-client
+ - ssl-required
+ - resource
+ type: object
+ properties:
+ realm:
+ description: Authentication realm name
+ type: string
+ auth-server-url:
+ description: SSO Server authentication url
+ type: string
+ public-client:
+ description: Name of public-client that can be used for requesting OAuth
+ token
+ type: string
+ ssl-required:
+ description: SSL certificates requirements
+ enum:
+ - none
+ - external
+ resource:
+ description: Name of Keycloak resource/application used on client side
+ type: string
+ RequestResponsePair:
+ description: Request associated with corresponding Response
+ type: object
+ allOf:
+ - required:
+ - request
+ - response
+ type: object
+ properties:
+ request:
+ $ref: '#/components/schemas/Request'
+ description: The request part of the pair
+ response:
+ $ref: '#/components/schemas/Response'
+ description: The Response part of the pair
+ - $ref: '#/components/schemas/AbstractExchange'
+ OperationOverrideDTO:
+ description: Data Transfer object for grouping the mutable properties of an
+ Operation
+ type: object
+ properties:
+ dispatcher:
+ description: Type of dispatcher to apply for this operation
+ type: string
+ dispatcherRules:
+ description: Rules of dispatcher for this operation
+ type: string
+ defaultDelay:
+ description: Default delay in milliseconds to apply to mock responses on
+ this operation
+ type: integer
+ parameterConstraints:
+ description: Constraints that may apply to incoming parameters on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ ParameterConstraint:
+ description: Companion object for Operation that may be used to express constraints
+ on request parameters
+ required:
+ - name
+ type: object
+ properties:
+ name:
+ description: Parameter name
+ type: string
+ required:
+ description: Whether it's a required constraint
+ type: boolean
+ recopy:
+ description: Whether it's a recopy constraint
+ type: boolean
+ mustMatchRegexp:
+ description: Whether it's a regular expression matching constraint
+ type: string
+ in:
+ description: Parameter location
+ enum:
+ - path
+ - query
+ - header
+ type: string
+ Metadata:
+ description: Commodity object for holding metadata on any entity. This object
+ is inspired by Kubernetes metadata.
+ required:
+ - createdOn
+ - lastUpdate
+ type: object
+ properties:
+ createdOn:
+ description: Creation date of attached object
+ type: integer
+ lastUpdate:
+ description: Last update of attached object
+ type: integer
+ annotations:
+ description: Annotations of attached object
+ type: object
+ additionalProperties:
+ type: string
+ labels:
+ description: Labels put on attached object
+ type: object
+ additionalProperties:
+ type: string
+ Operation:
+ description: An Operation of a Service or API
+ required:
+ - name
+ - method
+ type: object
+ properties:
+ name:
+ description: Unique name of this Operation within Service scope
+ type: string
+ method:
+ description: Represents transport method
+ type: string
+ inputName:
+ description: Name of input parameters in case of Xml based Service
+ type: string
+ outputName:
+ description: Name of output parameters in case of Xml based Service
+ type: string
+ dispatcher:
+ description: Dispatcher strategy used for mocks
+ type: string
+ dispatcherRules:
+ description: DispactherRules used for mocks
+ type: string
+ defaultDelay:
+ description: Default response time delay for mocks
+ type: number
+ resourcePaths:
+ description: Paths the mocks endpoints are mapped on
+ type: array
+ items:
+ type: string
+ parameterContraints:
+ description: Contraints that may apply to mock invocatino on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ bindings:
+ description: Map of protocol binding details for this operation
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Binding'
+ LabelsMap:
+ description: A map which keys are already used labels keys and values are already
+ used values for this key
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/StringArray'
+ type: object
+ UnidirectionalEvent:
+ description: Representation of an unidirectional exchange as an event message
+ type: object
+ allOf:
+ - required:
+ - eventMessage
+ type: object
+ properties:
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Asynchronous message for this unidirectional event
+ - $ref: '#/components/schemas/AbstractExchange'
+ EventMessage:
+ description: ""
+ required:
+ - id
+ - mediaType
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this message
+ type: string
+ mediaType:
+ description: Content type of message
+ type: string
+ name:
+ description: Unique distinct name of this message
+ type: string
+ content:
+ description: Body content for this message
+ type: string
+ operationId:
+ description: Identifier of Operation this message is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this message is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this message
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ StringArray:
+ description: A simple array of String
+ type: array
+ items:
+ type: string
+ MessageArray:
+ description: Array of Message for Service operations
+ type: array
+ items:
+ $ref: '#/components/schemas/Exchange'
+ Exchange:
+ oneOf:
+ - $ref: '#/components/schemas/RequestResponsePair'
+ - $ref: '#/components/schemas/UnidirectionalEvent'
+ discriminator:
+ propertyName: type
+ mapping:
+ reqRespPair: '#/components/schemas/RequestResponsePair'
+ unidirEvent: '#/components/schemas/UnidirectionalEvent'
+ AbstractExchange:
+ description: Abstract bean representing a Service or API Exchange.
+ required:
+ - type
+ type: object
+ properties:
+ type:
+ description: Discriminant type for identifying kind of exchange
+ enum:
+ - reqRespPair
+ - unidirEvent
+ type: string
+ ServiceView:
+ description: Aggregate bean for grouping a Service an its messages pairs
+ required:
+ - service
+ - messagesMap
+ type: object
+ properties:
+ service:
+ $ref: '#/components/schemas/Service'
+ description: Wrapped service description
+ messagesMap:
+ description: "Map of messages for this Service. Keys are operation name,\
+ \ values are array of messages for this operation"
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MessageArray'
+ OperationHeaders:
+ description: "Specification of additional headers for a Service/API operations.\
+ \ Keys are operation name or \"globals\" (if header applies to all), values\
+ \ are Header objects."
+ type: object
+ additionalProperties:
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ TestResult:
+ description: "Represents the result of a Service or API test run by Microcks.\
+ \ Tests are related to a service and made of multiple test cases corresponding\
+ \ to each operations / actions composing service. Tests are run against a\
+ \ specific endpoint named testedEndpoint. It holds global markers telling\
+ \ if test still ran, is a success, how many times is has taken and so on ..."
+ required:
+ - id
+ - version
+ - testNumber
+ - testedEndpoint
+ - serviceId
+ - success
+ - inProgress
+ - runnerType
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ version:
+ description: Revision number of this test
+ type: number
+ testNumber:
+ description: Incremental number for tracking number of tests of a service
+ type: number
+ testedEndpoint:
+ description: Endpoint used during test
+ type: string
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ elapsedTime:
+ description: Elapsed time in milliseconds since test beginning
+ type: number
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ inProgress:
+ description: Flag telling is test is still in progress
+ type: boolean
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ testCaseResults:
+ description: TestCase results associated to this test
+ type: array
+ items:
+ $ref: '#/components/schemas/TestCaseResult'
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: The referrence of the Secret used for connecting to test endpoint
+ operationHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ TestRequest:
+ description: Test request is a minimalist wrapper for requesting the launch
+ of a new test
+ required:
+ - serviceId
+ - testEndpoint
+ - runnerType
+ - timeout
+ properties:
+ serviceId:
+ description: Unique identifier of service to test
+ type: string
+ testEndpoint:
+ description: Endpoint to test for this service
+ type: string
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ filteredOperations:
+ description: A restriction on service operations to test
+ type: array
+ items:
+ type: string
+ operationHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ secretName:
+ description: The name of Secret to use for connecting the test endpoint
+ type: string
+ TestRunnerType:
+ description: Type of test strategy (different strategies are implemented by
+ different runners)
+ type: array
+ items:
+ enum:
+ - HTTP
+ - SOAP_HTTP
+ - SOAP_UI
+ - POSTMAN
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SCHEMA
+ - GRPC_PROTOBUF
+ type: string
+ Resource:
+ description: "Resource represents a Service or API artifacts such as specification,\
+ \ contract"
+ required:
+ - id
+ - name
+ - content
+ - type
+ - serviceId
+ type: object
+ properties:
+ id:
+ description: Uniquer identifier of this Service or API Resource
+ type: string
+ name:
+ description: Unique name/business identifier for this Service or API resource
+ type: string
+ content:
+ description: String content of this resource
+ type: string
+ type:
+ $ref: '#/components/schemas/ResourceType'
+ description: Type of this Service or API resource
+ serviceId:
+ description: Unique identifier of the Servoce or API this resource is attached
+ to
+ type: string
+ path:
+ description: Relatvie path of this resource regarding main resource
+ type: string
+ sourceArtifact:
+ description: Short name of the artifact this resource was extracted from
+ type: string
+ ResourceType:
+ description: Types of managed resources for Services or APIs
+ type: array
+ items:
+ enum:
+ - WSDL
+ - XSD
+ - JSON_SCHEMA
+ - OPEN_API_SPEC
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SPEC
+ - ASYNC_API_SCHEMA
+ - AVRO_SCHEMA
+ - PROTOBUF_SCHEMA
+ - PROTOBUF_DESCRIPTION
+ type: string
+ Binding:
+ description: Protocol binding details for asynchronous operations
+ required:
+ - type
+ - destinationName
+ type: object
+ properties:
+ type:
+ description: Protocol binding identifier
+ enum:
+ - KAFKA
+ - MQTT
+ - WS
+ type: string
+ keyType:
+ description: Type of key for Kafka messages
+ type: string
+ destinationType:
+ description: Type of destination for asynchronous messages of this operation
+ type: string
+ destinationName:
+ description: Name of destination for asynchronous messages of this operation
+ type: string
+ qoS:
+ description: Quality of Service attribute for MQTT binding
+ type: string
+ persistent:
+ description: Persistent attribute for MQTT binding
+ type: boolean
+ method:
+ description: HTTP method for WebSocket binding
+ type: string
+ Service:
+ description: Represents a Service or API definition as registred into Microcks
+ repository
+ required:
+ - name
+ - version
+ - type
+ properties:
+ id:
+ description: Unique identifier for this Service or API
+ type: string
+ name:
+ description: Distinct name for this Service or API (maybe shared among many
+ versions)
+ type: string
+ version:
+ description: Distinct version for a named Service or API
+ type: string
+ type:
+ description: Service or API Type
+ enum:
+ - REST
+ - SOAP_HTTP
+ - GENERIC_REST
+ - EVENT
+ - GRPC
+ type: string
+ operations:
+ description: Set of Operations for Service or API
+ type: array
+ items:
+ $ref: '#/components/schemas/Operation'
+ xmlNS:
+ description: Associated Xml Namespace in case of Xml based Service
+ type: string
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of Service
+ ImportJob:
+ description: An ImportJob allow defining a repository artifact to poll for discovering
+ Services and APIs mocks and tests
+ required:
+ - name
+ - repositoryUrl
+ properties:
+ id:
+ description: Unique identifier of ImportJob
+ type: string
+ name:
+ description: Unique distinct name of this ImportJob
+ type: string
+ repositoryUrl:
+ description: URL of mocks and tests repository artifact
+ type: string
+ repositoryDisableSSLValidation:
+ description: Whether to disable SSL certificate verification when checking
+ repository
+ type: boolean
+ frequency:
+ description: Reserved for future usage
+ type: string
+ createdDate:
+ format: date-time
+ description: Creation date for this ImportJob
+ type: string
+ lastImportDate:
+ format: date-time
+ description: Date last import was done
+ type: string
+ lastImportError:
+ description: Error message of last import (if any)
+ type: string
+ active:
+ description: Whether this ImportJob is active (ie. scheduled for execution)
+ type: boolean
+ etag:
+ description: Etag of repository URL during previous import. Is used for
+ not re-importing if no recent changes
+ type: string
+ serviceRefs:
+ description: References of Services discovered when checking repository
+ type: array
+ items:
+ $ref: '#/components/schemas/ServiceRef'
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of ImportJob
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: Reference of a Secret to used when checking repository
+ mainArtifact:
+ description: Flag telling if considered as primary or secondary artifact.
+ Default to `true`
+ type: boolean
+ responses:
+ ServiceResponse:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/Service'
+ - $ref: '#/components/schemas/ServiceView'
+ description: ""
+ securitySchemes:
+ jwt-bearer:
+ flows:
+ clientCredentials:
+ tokenUrl: https://keycloak.example.com/auth/realms/microcks/protocol/openid-connect/token
+ refreshUrl: https://keycloak.example.com/auth/realms/microcks/protocol/openid-connect/token
+ scopes:
+ user: ""
+ manager: ""
+ admin: ""
+ type: oauth2
+ description: JWT Bearer acquired using OAuth 2 Authentication flow or Direct
+ Access Grant
+security:
+- jwt-bearer: []
+tags:
+- name: mock
+ description: Operations related to API and Services mocks
+- name: test
+ description: Operations related to API and Services tests
+- name: job
+ description: Operations related to Jobs for discovering mocks and tests
+- name: config
+ description: Operations related to configuration
diff --git a/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.5.yaml b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.5.yaml
new file mode 100644
index 000000000..e14450565
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.5.yaml
@@ -0,0 +1,1813 @@
+---
+openapi: 3.0.2
+info:
+ title: Microcks API v1.5
+ version: 1.5.1
+ description: "API offered by Microcks, the mock and testing platform for API and\
+ \ microservices (microcks.io)"
+ contact:
+ name: Laurent Broudoux
+ url: https://github.com/lbroudoux
+ email: laurent.broudoux@gmail.com
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0
+servers:
+ - url: http://microcks.example.com/api
+ description: ""
+paths:
+ /services:
+ summary: This path operations deal with Services
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: page
+ description: Page of Services to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of Services to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServices
+ summary: Get Services and APIs
+ /tests:
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestRequest'
+ required: true
+ tags:
+ - test
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Created TestResult (empty shell cause tests are executed asynchronously)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateTest
+ summary: Create a new Test
+ /services/count:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Services in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServicesCounter
+ summary: Get the Services counter
+ /jobs:
+ summary: This path operations deal with ImportJobs
+ get:
+ tags:
+ - job
+ parameters:
+ - name: page
+ description: Page of ImportJobs to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of ImportJobs to include in a
+ response (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ - name: name
+ description: Name like criterion for query
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ImportJob'
+ description: List of found ImportJobs
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobs
+ summary: Get ImportJobs
+ description: Retrieve a list of ImportJobs
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Created ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateImportJob
+ summary: Create ImportJob
+ description: Create a new ImportJob
+ /jobs/{id}:
+ summary: This path or subpaths operations deal with specific ImportJob having
+ given id
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Found ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ summary: Get ImportJob
+ description: Retrieve an ImportJob using its identifier
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Updated ImportJob
+ summary: Update ImportJob
+ description: Update an ImportJob
+ delete:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: ImportJob deleted
+ security:
+ - jwt-bearer:
+ - user:identity
+ - admin
+ operationId: DeleteImportJob
+ summary: Delete ImportJob
+ description: Delete an ImportJob
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/activate:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: ImportJob is activated
+ security:
+ - jwt-bearer:
+ - user
+ operationId: ActivateImportJob
+ summary: Activate an ImportJob
+ description: "Make an ImportJob active, so that it is executed"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/start:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Started ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: StartImportJob
+ summary: Start an ImportJob
+ description: Starting an ImportJob forces it to immediatly import mock definitions
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/stop:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Stopped ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: StopImportJob
+ summary: Stop an ImportJob
+ description: "Stopping an ImportJob desactivate it, so that it won't execute\
+ \ at next schedule"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: messages
+ description: Whether to include details on services messages into result.
+ Default is false
+ schema:
+ type: boolean
+ in: query
+ responses:
+ "200":
+ $ref: '#/components/responses/ServiceResponse'
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetService
+ summary: Get Service
+ delete:
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: DeleteService
+ summary: Delete Service
+ description: Delete a Service
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /artifact/upload:
+ summary: Deals with artifacts to be imported by Microcks.
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/ArtifactUpload'
+ examples:
+ Artifact upload:
+ value: |
+ POST /api/artifact/upload HTTP/1.1
+ Host: microcks
+ User-Agent: curl/7.54.0
+ Accept: */*
+ Authorization: Bearer
+ Content-Length: 2743
+ Expect: 100-continue
+ Content-Type: multipart/form-data; boundary=------------------------8af8cbb56dd4bde0
+
+ --------------------------8af8cbb56dd4bde0
+ Content-Disposition: form-data; name="file"; filename="github.json"
+ Content-Type: application/octet-stream
+
+ THE ARTIFACT HERE
+
+ --------------------------8af8cbb56dd4bde0--
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact was imported and Service found
+ "204":
+ description: No file attribute found in uploaded data
+ "400":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact content is invalid and not understood
+ security:
+ - jwt-bearer:
+ - user
+ operationId: uploadArtifact
+ summary: Upload an artifact
+ description: Uploads an artifact to be imported by Microcks.
+ /jobs/count:
+ summary: Count ImportJobs
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of ImportJobs in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobCounter
+ summary: Get the ImportJobs counter
+ /secrets:
+ summary: This path operations deal with Secrets
+ get:
+ tags:
+ - config
+ parameters:
+ - name: page
+ description: Page of Secrets to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ required: false
+ - name: size
+ description: Size of a page. Maximum number of Secrets to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ required: false
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Secret'
+ description: List of found Secrets
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecrets
+ summary: Get Secrets
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ tags:
+ - config
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Created Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: CreateSecret
+ summary: Create a new Secret
+ /secrets/{id}:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Found Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetSecret
+ summary: Get Secret
+ description: Retrieve a Secret
+ put:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Updated Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: UpdateSecret
+ summary: Update Secret
+ description: Update a Secret
+ delete:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Secret has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: DeleteSecret
+ summary: Delete Secret
+ description: Delete a Secret
+ parameters:
+ - name: id
+ description: Unique identifier of Secret to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /secrets/count:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Secrets in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecretsCounter
+ summary: Get the Secrets counter
+ /tests/service/{serviceId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResult'
+ description: List of TestResults for the Service having the requested id
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByService
+ summary: Get TestResults by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/service/{serviceId}/count:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of TestResults for this Service in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByServiceCounter
+ summary: Get the TestResults for Service counter
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Requested TestResult
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResult
+ summary: Get TestResult
+ description: ""
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/messages/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RequestResponsePair'
+ description: List of request and response messages for this TestCase
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetMessagesByTestCase
+ summary: Get messages for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/testCaseResult:
+ post:
+ requestBody:
+ description: TestCase return wrapper object
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseReturnDTO'
+ required: true
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseResult'
+ description: TestCaseResult is reported
+ operationId: ReportTestCaseResult
+ summary: Report and create a new TestCaseResult
+ description: Report a TestCaseResult (typically used by a Test runner)
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /keycloak/config:
+ summary: Keycloak Authentification configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KeycloakConfig'
+ description: Get current configuration
+ operationId: GetKeycloakConfig
+ summary: Get authentification configuration
+ /services/{id}/operation:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OperationOverrideDTO'
+ required: true
+ tags:
+ - mock
+ parameters:
+ - name: operationName
+ description: Name of operation to update
+ schema:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ description: Operation has been updated
+ "500":
+ description: Operation cannot be updated
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: OverrideServiceOperation
+ summary: Override Service Operation
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}/metadata:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Metadata'
+ required: true
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service metadata has been updated
+ "500":
+ description: Update of metadata failed
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: UpdateServiceMetadata
+ summary: Update Service Metadata
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/labels:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LabelsMap'
+ description: "Already used labels: keys are label Keys, values are array\
+ \ of label Values"
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetServicesLabels
+ summary: Get the already used labels for Services
+ /services/search:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: queryMap
+ description: Map of criterion. Key can be simply 'name' with value as the
+ searched string. You can also search by label using keys like 'labels.x'
+ where 'x' is the label and value the label value
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services (filtered according search criteria)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: SearchServices
+ summary: Search for Services and APIs
+ /tests/{id}/events/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/UnidirectionalEvent'
+ description: List of event messages for this TestCase
+ operationId: GetEventsByTestCase
+ summary: Get events for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/{name}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Resource'
+ description: Retrieve the resource having this name
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResource
+ summary: Get Resource
+ parameters:
+ - name: name
+ description: Unique name/business identifier of the Service or API resource
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/service/{serviceId}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Resource'
+ description: List the resources attached to a Service or API
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResourcesByService
+ summary: Get Resources by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of the Service or API the resources are attached
+ to
+ schema:
+ type: string
+ in: path
+ required: true
+ /features/config:
+ summary: Optional features configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: Get features configuration
+ operationId: GetFeaturesConfiguration
+ summary: Get features configuration
+ /import:
+ summary: Deals with repository snapshot to import in Microcks
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/SnapshotUpload'
+ required: true
+ tags:
+ - mock
+ responses:
+ "201":
+ description: Snasphot has been correctly imported
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: importSnapshot
+ summary: Import a snapshot
+ description: Import a repository snapshot previsouly exported into Microcks
+ /export:
+ summary: Deals with repository snapshot to import from Microcks
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: serviceIds
+ description: List of service identifiers to export
+ schema:
+ type: array
+ items:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ headers:
+ Content-Disposition:
+ schema:
+ type: string
+ examples:
+ filename:
+ value: attachment; filename=microcks-repository.json
+ content:
+ application/json:
+ schema:
+ format: binary
+ type: string
+ description: Snapshot file representing the export of requested services
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: exportSnapshot
+ summary: Export a snapshot
+ description: Export a repostiory snapshot with requested services
+components:
+ schemas:
+ TestCaseResult:
+ description: Companion objects for TestResult. Each TestCaseResult correspond
+ to a particuliar service operation / action reference by the operationName
+ field. TestCaseResults owns a collection of TestStepResults (one for every
+ request associated to service operation / action).
+ required:
+ - success
+ - elapsedTime
+ - operationName
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test case beginning
+ type: number
+ operationName:
+ description: Name of operation this test case is bound to
+ type: string
+ testStepResults:
+ description: Test steps associated to this test case
+ type: array
+ items:
+ $ref: '#/components/schemas/TestStepResult'
+ ServiceRef:
+ description: Lightweight reference of an existing Service
+ required:
+ - serviceId
+ - name
+ - version
+ properties:
+ serviceId:
+ description: Unique reference of a Service
+ type: string
+ name:
+ description: The Service name
+ type: string
+ version:
+ description: The Service version
+ type: string
+ SecretRef:
+ description: Lightweight reference for an existing Secret
+ required:
+ - secretId
+ - name
+ properties:
+ secretId:
+ description: Unique identifier or referenced Secret
+ type: string
+ name:
+ description: Distinct name of the referenced Secret
+ type: string
+ example: |-
+ {
+ "secretId": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal"
+ }
+ Secret:
+ description: A Secret allows grouping informations on how to access a restricted
+ resource such as a repsoitory URL. Secrets are typically used by ImpoortJobs.
+ required:
+ - name
+ - description
+ properties:
+ id:
+ description: Unique identifier of Secret
+ type: string
+ name:
+ description: Unique distinct name of Secret
+ type: string
+ username:
+ type: string
+ password:
+ type: string
+ token:
+ type: string
+ tokenHeader:
+ type: string
+ caCertPem:
+ type: string
+ description:
+ description: Description of this Secret
+ type: string
+ example: |-
+ {
+ "id": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal",
+ "description": "Gogs internal corporate repository",
+ "username": "team",
+ "password": "team",
+ "caCertPem": "-----BEGIN CERTIFICATE-----\nMIIC6jCCAdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu\nc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIwHhcNMTgwNzE4MTA0ODIyWhcNMjMwNzE3\nMTA0ODIzWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIw\nggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCyaP1jlpnm8WpfCSnUa8Qt\nhdUynOLLgElUtpWoW25wB9tO2ZmEj+fVsTyzEsW8+nfXXfRsBEzPm2ze9uEMTPTB\nAY0k7DbLZfjmF1lCckUvvh1rR/8hoPuXETjXUuOdtm7gRHTOxLQyH2Qi/q0DYJAn\nprKyRCLa35pRnykL6v4bHkqFnqDEho63i29XHhm2703moh4YCl1iYa2Rh6D44cjn\n8lBCq6o7zoZSmc/aBamRkQrfZYcolR8OUtDS4oEB0zMftmea2ycashsLEMB+Cq4r\n64NI2QM7qOxdTuXsDivHfLl7RTuWEOozGaJXoiPaGU/3d/KnY0gKJ2TC1KXt6Xjn\nAgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG\nSIb3DQEBCwUAA4IBAQCeUmxfUzw0VAFG6HvVYIsfvumiIvsSWmclGIZqNJyfMHFD\nMy6xzPRNNfWe5aumGTJsuIzuXfDRcdO7KmH1d2/5brkvWpxp6svVrYPvcoXjl4VN\nQR2mv5Di4KHfiiwvP3eeewjUZj+uREGqX2fcbJPHTPy32Kpb0H8Uy09BklhjC7QP\ngRAGexPhU1oBL/CoOwbHKcQ6dxs/y1SxzI8gXEtec4z62CroI13iT7U0UjSqFBE4\nKfrJombfz0d68781Z40ll+8my251ZNfbLBhQ3UHW0JnkBEQkE1aBorUoj2iakYvx\nA2qZh+8q2b8MwMb2YsQ0dlxKd6c4tN3lmMnO4bnd\n-----END CERTIFICATE-----"
+ }
+ TestCaseReturnDTO:
+ required:
+ - operationName
+ properties:
+ operationName:
+ description: Name of related operation for this TestCase
+ type: string
+ TestReturn:
+ description: TestReturn is used for wrapping the return code of a test step
+ execution
+ required:
+ - code
+ - elapsedTime
+ properties:
+ code:
+ description: "Return code for test (0 means Success, 1 means Failure)"
+ type: integer
+ elapsedTime:
+ format: int64
+ description: Elapsed time in milliseconds
+ type: integer
+ message:
+ description: Error message if any
+ type: string
+ request:
+ $ref: '#/components/schemas/Request'
+ description: Request sent for this test
+ response:
+ $ref: '#/components/schemas/Response'
+ description: Response returned for this test
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Event Message received for this test
+ Request:
+ description: A mock invocation or test request
+ required:
+ - name
+ - operationId
+ properties:
+ id:
+ description: Unique identifier of Request
+ type: string
+ name:
+ description: Unique distinct name of this Request
+ type: string
+ content:
+ description: Body content for this request
+ type: string
+ operationId:
+ description: Identifier of Operation this Request is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Request is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Request
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Response:
+ description: A mock invocation or test response
+ required:
+ - operationId
+ - name
+ properties:
+ operationId:
+ description: Identifier of Operation this Response is associated to
+ type: string
+ content:
+ description: Body content of this Response
+ type: string
+ id:
+ description: Unique identifier of Response
+ type: string
+ name:
+ description: Unique distinct name of this Response
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Response is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Response
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Header:
+ description: Transport headers for both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this Header
+ type: array
+ items:
+ type: string
+ TestStepResult:
+ description: TestStepResult is an entity embedded within TestCaseResult. They
+ are created for each request associated with an operation / action of a microservice.
+ required:
+ - success
+ - elapsedTome
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test step beginning
+ type: number
+ requestName:
+ description: Name of request this test step is bound to
+ type: string
+ message:
+ description: Error message that may be associated to this test step
+ type: string
+ eventMessageName:
+ description: Name of event this test step is bound to
+ type: string
+ KeycloakConfig:
+ description: Representation of Keycloak / SSO configuration used by Microcks
+ server
+ required:
+ - realm
+ - auth-server-url
+ - public-client
+ - ssl-required
+ - resource
+ type: object
+ properties:
+ realm:
+ description: Authentication realm name
+ type: string
+ auth-server-url:
+ description: SSO Server authentication url
+ type: string
+ public-client:
+ description: Name of public-client that can be used for requesting OAuth
+ token
+ type: string
+ ssl-required:
+ description: SSL certificates requirements
+ enum:
+ - none
+ - external
+ resource:
+ description: Name of Keycloak resource/application used on client side
+ type: string
+ RequestResponsePair:
+ description: Request associated with corresponding Response
+ type: object
+ allOf:
+ - required:
+ - request
+ - response
+ type: object
+ properties:
+ request:
+ $ref: '#/components/schemas/Request'
+ description: The request part of the pair
+ response:
+ $ref: '#/components/schemas/Response'
+ description: The Response part of the pair
+ - $ref: '#/components/schemas/AbstractExchange'
+ OperationOverrideDTO:
+ description: Data Transfer object for grouping the mutable properties of an
+ Operation
+ type: object
+ properties:
+ dispatcher:
+ description: Type of dispatcher to apply for this operation
+ type: string
+ dispatcherRules:
+ description: Rules of dispatcher for this operation
+ type: string
+ defaultDelay:
+ description: Default delay in milliseconds to apply to mock responses on
+ this operation
+ type: integer
+ parameterConstraints:
+ description: Constraints that may apply to incoming parameters on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ ParameterConstraint:
+ description: Companion object for Operation that may be used to express constraints
+ on request parameters
+ required:
+ - name
+ type: object
+ properties:
+ name:
+ description: Parameter name
+ type: string
+ required:
+ description: Whether it's a required constraint
+ type: boolean
+ recopy:
+ description: Whether it's a recopy constraint
+ type: boolean
+ mustMatchRegexp:
+ description: Whether it's a regular expression matching constraint
+ type: string
+ in:
+ description: Parameter location
+ enum:
+ - path
+ - query
+ - header
+ type: string
+ Metadata:
+ description: Commodity object for holding metadata on any entity. This object
+ is inspired by Kubernetes metadata.
+ required:
+ - createdOn
+ - lastUpdate
+ type: object
+ properties:
+ createdOn:
+ description: Creation date of attached object
+ type: integer
+ lastUpdate:
+ description: Last update of attached object
+ type: integer
+ annotations:
+ description: Annotations of attached object
+ type: object
+ additionalProperties:
+ type: string
+ labels:
+ description: Labels put on attached object
+ type: object
+ additionalProperties:
+ type: string
+ LabelsMap:
+ description: A map which keys are already used labels keys and values are already
+ used values for this key
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/StringArray'
+ type: object
+ UnidirectionalEvent:
+ description: Representation of an unidirectional exchange as an event message
+ type: object
+ allOf:
+ - required:
+ - eventMessage
+ type: object
+ properties:
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Asynchronous message for this unidirectional event
+ - $ref: '#/components/schemas/AbstractExchange'
+ EventMessage:
+ description: ""
+ required:
+ - id
+ - mediaType
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this message
+ type: string
+ mediaType:
+ description: Content type of message
+ type: string
+ name:
+ description: Unique distinct name of this message
+ type: string
+ content:
+ description: Body content for this message
+ type: string
+ operationId:
+ description: Identifier of Operation this message is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this message is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this message
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ StringArray:
+ description: A simple array of String
+ type: array
+ items:
+ type: string
+ MessageArray:
+ description: Array of Message for Service operations
+ type: array
+ items:
+ $ref: '#/components/schemas/Exchange'
+ Exchange:
+ oneOf:
+ - $ref: '#/components/schemas/RequestResponsePair'
+ - $ref: '#/components/schemas/UnidirectionalEvent'
+ discriminator:
+ propertyName: type
+ mapping:
+ reqRespPair: '#/components/schemas/RequestResponsePair'
+ unidirEvent: '#/components/schemas/UnidirectionalEvent'
+ AbstractExchange:
+ description: Abstract bean representing a Service or API Exchange.
+ required:
+ - type
+ type: object
+ properties:
+ type:
+ description: Discriminant type for identifying kind of exchange
+ enum:
+ - reqRespPair
+ - unidirEvent
+ type: string
+ ServiceView:
+ description: Aggregate bean for grouping a Service an its messages pairs
+ required:
+ - service
+ - messagesMap
+ type: object
+ properties:
+ service:
+ $ref: '#/components/schemas/Service'
+ description: Wrapped service description
+ messagesMap:
+ description: "Map of messages for this Service. Keys are operation name,\
+ \ values are array of messages for this operation"
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MessageArray'
+ TestResult:
+ description: "Represents the result of a Service or API test run by Microcks.\
+ \ Tests are related to a service and made of multiple test cases corresponding\
+ \ to each operations / actions composing service. Tests are run against a\
+ \ specific endpoint named testedEndpoint. It holds global markers telling\
+ \ if test still ran, is a success, how many times is has taken and so on ..."
+ required:
+ - id
+ - version
+ - testNumber
+ - testedEndpoint
+ - serviceId
+ - success
+ - inProgress
+ - runnerType
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ version:
+ description: Revision number of this test
+ type: number
+ testNumber:
+ description: Incremental number for tracking number of tests of a service
+ type: number
+ testedEndpoint:
+ description: Endpoint used during test
+ type: string
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ elapsedTime:
+ description: Elapsed time in milliseconds since test beginning
+ type: number
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ inProgress:
+ description: Flag telling is test is still in progress
+ type: boolean
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ testCaseResults:
+ description: TestCase results associated to this test
+ type: array
+ items:
+ $ref: '#/components/schemas/TestCaseResult'
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: The referrence of the Secret used for connecting to test endpoint
+ operationHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ TestRequest:
+ description: Test request is a minimalist wrapper for requesting the launch
+ of a new test
+ required:
+ - serviceId
+ - testEndpoint
+ - runnerType
+ - timeout
+ properties:
+ serviceId:
+ description: Unique identifier of service to test
+ type: string
+ testEndpoint:
+ description: Endpoint to test for this service
+ type: string
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ filteredOperations:
+ description: A restriction on service operations to test
+ type: array
+ items:
+ type: string
+ operationHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ secretName:
+ description: The name of Secret to use for connecting the test endpoint
+ type: string
+ Resource:
+ description: "Resource represents a Service or API artifacts such as specification,\
+ \ contract"
+ required:
+ - id
+ - name
+ - content
+ - type
+ - serviceId
+ type: object
+ properties:
+ id:
+ description: Uniquer identifier of this Service or API Resource
+ type: string
+ name:
+ description: Unique name/business identifier for this Service or API resource
+ type: string
+ content:
+ description: String content of this resource
+ type: string
+ type:
+ $ref: '#/components/schemas/ResourceType'
+ description: Type of this Service or API resource
+ serviceId:
+ description: Unique identifier of the Servoce or API this resource is attached
+ to
+ type: string
+ path:
+ description: Relatvie path of this resource regarding main resource
+ type: string
+ sourceArtifact:
+ description: Short name of the artifact this resource was extracted from
+ type: string
+ Binding:
+ description: Protocol binding details for asynchronous operations
+ required:
+ - type
+ - destinationName
+ type: object
+ properties:
+ type:
+ description: Protocol binding identifier
+ enum:
+ - KAFKA
+ - MQTT
+ - WS
+ - AMQP
+ type: string
+ keyType:
+ description: Type of key for Kafka messages
+ type: string
+ destinationType:
+ description: Type of destination for asynchronous messages of this operation
+ type: string
+ destinationName:
+ description: Name of destination for asynchronous messages of this operation
+ type: string
+ qoS:
+ description: Quality of Service attribute for MQTT binding
+ type: string
+ persistent:
+ description: Persistent attribute for MQTT binding
+ type: boolean
+ method:
+ description: HTTP method for WebSocket binding
+ type: string
+ Service:
+ description: Represents a Service or API definition as registred into Microcks
+ repository
+ required:
+ - name
+ - version
+ - type
+ properties:
+ id:
+ description: Unique identifier for this Service or API
+ type: string
+ name:
+ description: Distinct name for this Service or API (maybe shared among many
+ versions)
+ type: string
+ version:
+ description: Distinct version for a named Service or API
+ type: string
+ type:
+ description: Service or API Type
+ enum:
+ - REST
+ - SOAP_HTTP
+ - GENERIC_REST
+ - EVENT
+ - GRPC
+ type: string
+ operations:
+ description: Set of Operations for Service or API
+ type: array
+ items:
+ $ref: '#/components/schemas/Operation'
+ xmlNS:
+ description: Associated Xml Namespace in case of Xml based Service
+ type: string
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of Service
+ ImportJob:
+ description: An ImportJob allow defining a repository artifact to poll for discovering
+ Services and APIs mocks and tests
+ required:
+ - name
+ - repositoryUrl
+ properties:
+ id:
+ description: Unique identifier of ImportJob
+ type: string
+ name:
+ description: Unique distinct name of this ImportJob
+ type: string
+ repositoryUrl:
+ description: URL of mocks and tests repository artifact
+ type: string
+ repositoryDisableSSLValidation:
+ description: Whether to disable SSL certificate verification when checking
+ repository
+ type: boolean
+ frequency:
+ description: Reserved for future usage
+ type: string
+ createdDate:
+ format: date-time
+ description: Creation date for this ImportJob
+ type: string
+ lastImportDate:
+ format: date-time
+ description: Date last import was done
+ type: string
+ lastImportError:
+ description: Error message of last import (if any)
+ type: string
+ active:
+ description: Whether this ImportJob is active (ie. scheduled for execution)
+ type: boolean
+ etag:
+ description: Etag of repository URL during previous import. Is used for
+ not re-importing if no recent changes
+ type: string
+ serviceRefs:
+ description: References of Services discovered when checking repository
+ type: array
+ items:
+ $ref: '#/components/schemas/ServiceRef'
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of ImportJob
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: Reference of a Secret to used when checking repository
+ mainArtifact:
+ description: Flag telling if considered as primary or secondary artifact.
+ Default to `true`
+ type: boolean
+ TestRunnerType:
+ description: Type of test strategy (different strategies are implemented by
+ different runners)
+ type: array
+ items:
+ enum:
+ - HTTP
+ - SOAP_HTTP
+ - SOAP_UI
+ - POSTMAN
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SCHEMA
+ - GRPC_PROTOBUF
+ - GRAPHQL_SCHEMA
+ type: string
+ ResourceType:
+ description: Types of managed resources for Services or APIs
+ type: array
+ items:
+ enum:
+ - WSDL
+ - XSD
+ - JSON_SCHEMA
+ - OPEN_API_SPEC
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SPEC
+ - ASYNC_API_SCHEMA
+ - AVRO_SCHEMA
+ - PROTOBUF_SCHEMA
+ - PROTOBUF_DESCRIPTION
+ - GRAPHQL_SCHEMA
+ type: string
+ Operation:
+ description: An Operation of a Service or API
+ required:
+ - name
+ - method
+ type: object
+ properties:
+ name:
+ description: Unique name of this Operation within Service scope
+ type: string
+ method:
+ description: Represents transport method
+ type: string
+ inputName:
+ description: Name of input parameters in case of Xml based Service
+ type: string
+ outputName:
+ description: Name of output parameters in case of Xml based Service
+ type: string
+ dispatcher:
+ description: Dispatcher strategy used for mocks
+ type: string
+ dispatcherRules:
+ description: DispatcherRules used for mocks
+ type: string
+ defaultDelay:
+ description: Default response time delay for mocks
+ type: number
+ resourcePaths:
+ description: Paths the mocks endpoints are mapped on
+ type: array
+ items:
+ type: string
+ parameterContraints:
+ description: Contraints that may apply to mock invocatino on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ bindings:
+ description: Map of protocol binding details for this operation
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Binding'
+ ArtifactUpload:
+ description: |-
+ Artifact to be imported by Microcks.
+ This structure represents a mime-multipart file upload (as specified here: https://swagger.io/docs/specification/describing-request-body/file-upload/)
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The artifact to upload
+ type: string
+ mainArtifact:
+ description: Flag telling if this should be considered as primary or secondary
+ artifact. Default to 'true'
+ type: boolean
+ Counter:
+ description: The root of the Counter type's schema.
+ type: object
+ properties:
+ counter:
+ format: int32
+ description: Number of items in a resource collection
+ type: integer
+ example: |-
+ {
+ "counter": 12
+ }
+ FeaturesConfig:
+ title: Root Type for FeaturesConfig
+ description: Representation of optional features configuration used by Microcks
+ server
+ type: object
+ properties:
+ repository-filter:
+ description: Repository filtering feature properties
+ type: object
+ properties:
+ label-label:
+ type: string
+ enabled:
+ type: string
+ label-list:
+ type: string
+ label-key:
+ type: string
+ microcks-hub:
+ description: Microcks Hub feature properties
+ type: object
+ properties:
+ allowed-roles:
+ type: string
+ endpoint:
+ type: string
+ enabled:
+ type: string
+ repository-tenancy:
+ description: Repository tenancy feature properties
+ type: object
+ properties:
+ enabled:
+ type: string
+ artifact-import-allowed-roles:
+ type: string
+ async-api:
+ description: Asynchronous feature properties
+ type: object
+ properties:
+ default-binding:
+ type: string
+ endpoint-MQTT:
+ type: string
+ endpoint-WS:
+ type: string
+ endpoint-KAFKA:
+ type: string
+ enabled:
+ type: string
+ frequencies:
+ type: string
+ additionalProperties: true
+ example:
+ repository-filter:
+ label-label: Domain
+ enabled: "true"
+ label-list: "domain,status"
+ label-key: domain
+ microcks-hub:
+ allowed-roles: "admin,manager,manager-any"
+ endpoint: https://hub.microcks.io/api
+ enabled: "true"
+ repository-tenancy:
+ enabled: "false"
+ artifact-import-allowed-roles: "admin,manager,manager-any"
+ async-api:
+ default-binding: KAFKA
+ endpoint-MQTT: my-mqtt-broker.apps.try.microcks.io
+ endpoint-WS: localhost:8081
+ endpoint-KAFKA: my-cluster-kafka-bootstrap.apps.try.microcks.io
+ enabled: "false"
+ frequencies: "3,10,30"
+ SnapshotUpload:
+ description: Upload of a repository snapshot file
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The repository snapshot file
+ type: string
+ HeaderDTO:
+ description: Data Transfert Object for headers of both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this header (comma separated strings)
+ type: string
+ OperationHeaders:
+ description: "Specification of additional headers for a Service/API operations.\
+ \ Keys are operation name or \"globals\" (if header applies to all), values\
+ \ are Header objects DTO."
+ type: object
+ additionalProperties:
+ type: array
+ items:
+ $ref: '#/components/schemas/HeaderDTO'
+ responses:
+ ServiceResponse:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/Service'
+ - $ref: '#/components/schemas/ServiceView'
+ description: ""
+ securitySchemes:
+ jwt-bearer:
+ flows:
+ clientCredentials:
+ tokenUrl: https://keycloak.example.com/auth/realms/microcks/protocol/openid-connect/token
+ refreshUrl: https://keycloak.example.com/auth/realms/microcks/protocol/openid-connect/token
+ scopes:
+ user: ""
+ manager: ""
+ admin: ""
+ type: oauth2
+ description: JWT Bearer acquired using OAuth 2 Authentication flow or Direct
+ Access Grant
+security:
+ - jwt-bearer: []
+tags:
+ - name: mock
+ description: Operations related to API and Services mocks
+ - name: test
+ description: Operations related to API and Services tests
+ - name: job
+ description: Operations related to Jobs for discovering mocks and tests
+ - name: config
+ description: Operations related to configuration
diff --git a/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.6.yaml b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.6.yaml
new file mode 100644
index 000000000..a96160b55
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.6.yaml
@@ -0,0 +1,2122 @@
+---
+openapi: 3.0.2
+info:
+ title: Microcks API v1.6
+ version: 1.6.0
+ description: "API offered by Microcks, the mock and testing platform for API and\
+ \ microservices (microcks.io)"
+ contact:
+ name: Laurent Broudoux
+ url: https://github.com/lbroudoux
+ email: laurent.broudoux@gmail.com
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0
+servers:
+- url: http://microcks.example.com/api
+ description: ""
+paths:
+ /services:
+ summary: This path operations deal with Services
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: page
+ description: Page of Services to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of Services to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServices
+ summary: Get Services and APIs
+ /tests:
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestRequest'
+ required: true
+ tags:
+ - test
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Created TestResult (empty shell cause tests are executed asynchronously)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateTest
+ summary: Create a new Test
+ /services/count:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Services in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServicesCounter
+ summary: Get the Services counter
+ /jobs:
+ summary: This path operations deal with ImportJobs
+ get:
+ tags:
+ - job
+ parameters:
+ - name: page
+ description: Page of ImportJobs to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of ImportJobs to include in a
+ response (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ - name: name
+ description: Name like criterion for query
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ImportJob'
+ description: List of found ImportJobs
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobs
+ summary: Get ImportJobs
+ description: Retrieve a list of ImportJobs
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Created ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateImportJob
+ summary: Create ImportJob
+ description: Create a new ImportJob
+ /jobs/{id}:
+ summary: This path or subpaths operations deal with specific ImportJob having
+ given id
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Found ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ summary: Get ImportJob
+ description: Retrieve an ImportJob using its identifier
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Updated ImportJob
+ summary: Update ImportJob
+ description: Update an ImportJob
+ delete:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: ImportJob deleted
+ security:
+ - jwt-bearer:
+ - user:identity
+ - admin
+ operationId: DeleteImportJob
+ summary: Delete ImportJob
+ description: Delete an ImportJob
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/activate:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: ImportJob is activated
+ security:
+ - jwt-bearer:
+ - user
+ operationId: ActivateImportJob
+ summary: Activate an ImportJob
+ description: "Make an ImportJob active, so that it is executed"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/start:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Started ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: StartImportJob
+ summary: Start an ImportJob
+ description: Starting an ImportJob forces it to immediatly import mock definitions
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/stop:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Stopped ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: StopImportJob
+ summary: Stop an ImportJob
+ description: "Stopping an ImportJob desactivate it, so that it won't execute\
+ \ at next schedule"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: messages
+ description: Whether to include details on services messages into result.
+ Default is false
+ schema:
+ type: boolean
+ in: query
+ responses:
+ "200":
+ $ref: '#/components/responses/ServiceResponse'
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetService
+ summary: Get Service
+ delete:
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: DeleteService
+ summary: Delete Service
+ description: Delete a Service
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /artifact/upload:
+ summary: Deals with artifacts to be imported by Microcks.
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/ArtifactUpload'
+ examples:
+ Artifact upload:
+ value: |
+ POST /api/artifact/upload HTTP/1.1
+ Host: microcks
+ User-Agent: curl/7.54.0
+ Accept: */*
+ Authorization: Bearer
+ Content-Length: 2743
+ Expect: 100-continue
+ Content-Type: multipart/form-data; boundary=------------------------8af8cbb56dd4bde0
+
+ --------------------------8af8cbb56dd4bde0
+ Content-Disposition: form-data; name="file"; filename="github.json"
+ Content-Type: application/octet-stream
+
+ THE ARTIFACT HERE
+
+ --------------------------8af8cbb56dd4bde0--
+ required: true
+ tags:
+ - job
+ parameters:
+ - name: mainArtifact
+ description: Flag telling if this should be considered as primary or secondary
+ artifact. Default to 'true'
+ schema:
+ type: boolean
+ in: query
+ required: true
+ responses:
+ "201":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact was imported and Service found
+ "204":
+ description: No file attribute found in uploaded data
+ "400":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact content is invalid and not understood
+ security:
+ - jwt-bearer:
+ - user
+ operationId: uploadArtifact
+ summary: Upload an artifact
+ description: Uploads an artifact to be imported by Microcks.
+ /jobs/count:
+ summary: Count ImportJobs
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of ImportJobs in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobCounter
+ summary: Get the ImportJobs counter
+ /secrets:
+ summary: This path operations deal with Secrets
+ get:
+ tags:
+ - config
+ parameters:
+ - name: page
+ description: Page of Secrets to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ required: false
+ - name: size
+ description: Size of a page. Maximum number of Secrets to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ required: false
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Secret'
+ description: List of found Secrets
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecrets
+ summary: Get Secrets
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ tags:
+ - config
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Created Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: CreateSecret
+ summary: Create a new Secret
+ /secrets/{id}:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Found Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetSecret
+ summary: Get Secret
+ description: Retrieve a Secret
+ put:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Updated Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: UpdateSecret
+ summary: Update Secret
+ description: Update a Secret
+ delete:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Secret has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: DeleteSecret
+ summary: Delete Secret
+ description: Delete a Secret
+ parameters:
+ - name: id
+ description: Unique identifier of Secret to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /secrets/count:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Secrets in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecretsCounter
+ summary: Get the Secrets counter
+ /tests/service/{serviceId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResult'
+ description: List of TestResults for the Service having the requested id
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByService
+ summary: Get TestResults by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/service/{serviceId}/count:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of TestResults for this Service in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByServiceCounter
+ summary: Get the TestResults for Service counter
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Requested TestResult
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResult
+ summary: Get TestResult
+ description: ""
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/messages/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RequestResponsePair'
+ description: List of request and response messages for this TestCase
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetMessagesByTestCase
+ summary: Get messages for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/testCaseResult:
+ post:
+ requestBody:
+ description: TestCase return wrapper object
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseReturnDTO'
+ required: true
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseResult'
+ description: TestCaseResult is reported
+ operationId: ReportTestCaseResult
+ summary: Report and create a new TestCaseResult
+ description: Report a TestCaseResult (typically used by a Test runner)
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /keycloak/config:
+ summary: Keycloak Authentification configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KeycloakConfig'
+ description: Get current configuration
+ operationId: GetKeycloakConfig
+ summary: Get authentification configuration
+ /services/{id}/operation:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OperationOverrideDTO'
+ required: true
+ tags:
+ - mock
+ parameters:
+ - name: operationName
+ description: Name of operation to update
+ schema:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ description: Operation has been updated
+ "500":
+ description: Operation cannot be updated
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: OverrideServiceOperation
+ summary: Override Service Operation
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}/metadata:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Metadata'
+ required: true
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service metadata has been updated
+ "500":
+ description: Update of metadata failed
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: UpdateServiceMetadata
+ summary: Update Service Metadata
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/labels:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LabelsMap'
+ description: "Already used labels: keys are label Keys, values are array\
+ \ of label Values"
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetServicesLabels
+ summary: Get the already used labels for Services
+ /services/search:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: queryMap
+ description: Map of criterion. Key can be simply 'name' with value as the
+ searched string. You can also search by label using keys like 'labels.x'
+ where 'x' is the label and value the label value
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services (filtered according search criteria)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: SearchServices
+ summary: Search for Services and APIs
+ /tests/{id}/events/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/UnidirectionalEvent'
+ description: List of event messages for this TestCase
+ operationId: GetEventsByTestCase
+ summary: Get events for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/{name}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Resource'
+ description: Retrieve the resource having this name
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResource
+ summary: Get Resource
+ parameters:
+ - name: name
+ description: Unique name/business identifier of the Service or API resource
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/service/{serviceId}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Resource'
+ description: List the resources attached to a Service or API
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResourcesByService
+ summary: Get Resources by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of the Service or API the resources are attached
+ to
+ schema:
+ type: string
+ in: path
+ required: true
+ /features/config:
+ summary: Optional features configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: Get features configuration
+ operationId: GetFeaturesConfiguration
+ summary: Get features configuration
+ /import:
+ summary: Deals with repository snapshot to import in Microcks
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/SnapshotUpload'
+ required: true
+ tags:
+ - mock
+ responses:
+ "201":
+ description: Snasphot has been correctly imported
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: importSnapshot
+ summary: Import a snapshot
+ description: Import a repository snapshot previsouly exported into Microcks
+ /export:
+ summary: Deals with repository snapshot to import from Microcks
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: serviceIds
+ description: List of service identifiers to export
+ schema:
+ type: array
+ items:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ headers:
+ Content-Disposition:
+ schema:
+ type: string
+ examples:
+ filename:
+ value: attachment; filename=microcks-repository.json
+ content:
+ application/json:
+ schema:
+ format: binary
+ type: string
+ description: Snapshot file representing the export of requested services
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: exportSnapshot
+ summary: Export a snapshot
+ description: Export a repostiory snapshot with requested services
+ /metrics/invocations/global:
+ summary: Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Aggregated invocation statistics for specified day
+ operationId: GetAggregatedInvocationsStats
+ summary: Get aggregated invocation statistics for a day
+ /metrics/conformance/aggregate:
+ summary: Aggregation of Test conformance metrics
+ get:
+ tags:
+ - metrics
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/WeightedMetricValue'
+ description: Get aggregated coverage metric value
+ operationId: GetConformanceMetricsAggregation
+ summary: Get aggregation of conformance metrics
+ /metrics/conformance/service/{serviceId}:
+ summary: Test Conformance metrics on API and Services
+ get:
+ tags:
+ - metrics
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestConformanceMetric'
+ description: Test coverage metric for Service
+ operationId: GetServiceTestConformanceMetric
+ summary: Get conformance metrics for a Service
+ parameters:
+ - name: serviceId
+ description: Unique Services identifier this metrics are related to
+ schema:
+ type: string
+ in: path
+ required: true
+ /metrics/invocations/top:
+ summary: Top Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ - name: limit
+ description: The number of top invoked mocks to return
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Top invocations for a defined day
+ operationId: GetTopIvnocationsStatsByDay
+ summary: Get top invocation statistics for a day
+ /metrics/invocations/{serviceName}/{serviceVersion}:
+ summary: Invocation Statistics for API and Services
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Invocation statistics for service for specified day
+ operationId: GetInvocationStatsByService
+ summary: Get invocation statistics for Service
+ parameters:
+ - name: serviceName
+ description: Name of service to get statistics for
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: serviceVersion
+ description: Version of service to get statistics for
+ schema:
+ type: string
+ in: path
+ required: true
+ /metrics/invocations/global/latest:
+ summary: Latest Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: limit
+ description: Number of days to get back in time. Default is 20.
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CounterMap'
+ description: A map where keys are day (formatted using yyyyMMdd pattern)
+ and values are counter of invocations on this day
+ operationId: GetLatestAggregatedInvocationsStats
+ summary: Get aggregated invocations statistics for latest days
+ /metrics/tests/latest:
+ summary: Lastest Test results across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: limit
+ description: Number of days to consider for test results to return. Default
+ is 7 (one week)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResultSummary'
+ description: Test results summary for specified last days.
+ operationId: GetLatestTestResults
+ summary: Get latest tests results
+components:
+ schemas:
+ TestCaseResult:
+ description: Companion objects for TestResult. Each TestCaseResult correspond
+ to a particuliar service operation / action reference by the operationName
+ field. TestCaseResults owns a collection of TestStepResults (one for every
+ request associated to service operation / action).
+ required:
+ - success
+ - elapsedTime
+ - operationName
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test case beginning
+ type: number
+ operationName:
+ description: Name of operation this test case is bound to
+ type: string
+ testStepResults:
+ description: Test steps associated to this test case
+ type: array
+ items:
+ $ref: '#/components/schemas/TestStepResult'
+ ServiceRef:
+ description: Lightweight reference of an existing Service
+ required:
+ - serviceId
+ - name
+ - version
+ properties:
+ serviceId:
+ description: Unique reference of a Service
+ type: string
+ name:
+ description: The Service name
+ type: string
+ version:
+ description: The Service version
+ type: string
+ SecretRef:
+ description: Lightweight reference for an existing Secret
+ required:
+ - secretId
+ - name
+ properties:
+ secretId:
+ description: Unique identifier or referenced Secret
+ type: string
+ name:
+ description: Distinct name of the referenced Secret
+ type: string
+ example: |-
+ {
+ "secretId": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal"
+ }
+ Secret:
+ description: A Secret allows grouping informations on how to access a restricted
+ resource such as a repsoitory URL. Secrets are typically used by ImpoortJobs.
+ required:
+ - name
+ - description
+ properties:
+ id:
+ description: Unique identifier of Secret
+ type: string
+ name:
+ description: Unique distinct name of Secret
+ type: string
+ username:
+ type: string
+ password:
+ type: string
+ token:
+ type: string
+ tokenHeader:
+ type: string
+ caCertPem:
+ type: string
+ description:
+ description: Description of this Secret
+ type: string
+ example: |-
+ {
+ "id": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal",
+ "description": "Gogs internal corporate repository",
+ "username": "team",
+ "password": "team",
+ "caCertPem": "-----BEGIN CERTIFICATE-----\nMIIC6jCCAdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu\nc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIwHhcNMTgwNzE4MTA0ODIyWhcNMjMwNzE3\nMTA0ODIzWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIw\nggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCyaP1jlpnm8WpfCSnUa8Qt\nhdUynOLLgElUtpWoW25wB9tO2ZmEj+fVsTyzEsW8+nfXXfRsBEzPm2ze9uEMTPTB\nAY0k7DbLZfjmF1lCckUvvh1rR/8hoPuXETjXUuOdtm7gRHTOxLQyH2Qi/q0DYJAn\nprKyRCLa35pRnykL6v4bHkqFnqDEho63i29XHhm2703moh4YCl1iYa2Rh6D44cjn\n8lBCq6o7zoZSmc/aBamRkQrfZYcolR8OUtDS4oEB0zMftmea2ycashsLEMB+Cq4r\n64NI2QM7qOxdTuXsDivHfLl7RTuWEOozGaJXoiPaGU/3d/KnY0gKJ2TC1KXt6Xjn\nAgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG\nSIb3DQEBCwUAA4IBAQCeUmxfUzw0VAFG6HvVYIsfvumiIvsSWmclGIZqNJyfMHFD\nMy6xzPRNNfWe5aumGTJsuIzuXfDRcdO7KmH1d2/5brkvWpxp6svVrYPvcoXjl4VN\nQR2mv5Di4KHfiiwvP3eeewjUZj+uREGqX2fcbJPHTPy32Kpb0H8Uy09BklhjC7QP\ngRAGexPhU1oBL/CoOwbHKcQ6dxs/y1SxzI8gXEtec4z62CroI13iT7U0UjSqFBE4\nKfrJombfz0d68781Z40ll+8my251ZNfbLBhQ3UHW0JnkBEQkE1aBorUoj2iakYvx\nA2qZh+8q2b8MwMb2YsQ0dlxKd6c4tN3lmMnO4bnd\n-----END CERTIFICATE-----"
+ }
+ TestCaseReturnDTO:
+ required:
+ - operationName
+ properties:
+ operationName:
+ description: Name of related operation for this TestCase
+ type: string
+ TestReturn:
+ description: TestReturn is used for wrapping the return code of a test step
+ execution
+ required:
+ - code
+ - elapsedTime
+ properties:
+ code:
+ description: "Return code for test (0 means Success, 1 means Failure)"
+ type: integer
+ elapsedTime:
+ format: int64
+ description: Elapsed time in milliseconds
+ type: integer
+ message:
+ description: Error message if any
+ type: string
+ request:
+ $ref: '#/components/schemas/Request'
+ description: Request sent for this test
+ response:
+ $ref: '#/components/schemas/Response'
+ description: Response returned for this test
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Event Message received for this test
+ Request:
+ description: A mock invocation or test request
+ required:
+ - name
+ - operationId
+ properties:
+ id:
+ description: Unique identifier of Request
+ type: string
+ name:
+ description: Unique distinct name of this Request
+ type: string
+ content:
+ description: Body content for this request
+ type: string
+ operationId:
+ description: Identifier of Operation this Request is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Request is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Request
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Response:
+ description: A mock invocation or test response
+ required:
+ - operationId
+ - name
+ properties:
+ operationId:
+ description: Identifier of Operation this Response is associated to
+ type: string
+ content:
+ description: Body content of this Response
+ type: string
+ id:
+ description: Unique identifier of Response
+ type: string
+ name:
+ description: Unique distinct name of this Response
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Response is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Response
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Header:
+ description: Transport headers for both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this Header
+ type: array
+ items:
+ type: string
+ TestStepResult:
+ description: TestStepResult is an entity embedded within TestCaseResult. They
+ are created for each request associated with an operation / action of a microservice.
+ required:
+ - success
+ - elapsedTome
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test step beginning
+ type: number
+ requestName:
+ description: Name of request this test step is bound to
+ type: string
+ message:
+ description: Error message that may be associated to this test step
+ type: string
+ eventMessageName:
+ description: Name of event this test step is bound to
+ type: string
+ KeycloakConfig:
+ description: Representation of Keycloak / SSO configuration used by Microcks
+ server
+ required:
+ - realm
+ - auth-server-url
+ - public-client
+ - ssl-required
+ - resource
+ - enabled
+ type: object
+ properties:
+ realm:
+ description: Authentication realm name
+ type: string
+ auth-server-url:
+ description: SSO Server authentication url
+ type: string
+ public-client:
+ description: Name of public-client that can be used for requesting OAuth
+ token
+ type: string
+ ssl-required:
+ description: SSL certificates requirements
+ enum:
+ - none
+ - external
+ resource:
+ description: Name of Keycloak resource/application used on client side
+ type: string
+ enabled:
+ description: Whether Keycloak authentification and usage is enabled
+ type: boolean
+ RequestResponsePair:
+ description: Request associated with corresponding Response
+ type: object
+ allOf:
+ - required:
+ - request
+ - response
+ type: object
+ properties:
+ request:
+ $ref: '#/components/schemas/Request'
+ description: The request part of the pair
+ response:
+ $ref: '#/components/schemas/Response'
+ description: The Response part of the pair
+ - $ref: '#/components/schemas/AbstractExchange'
+ OperationOverrideDTO:
+ description: Data Transfer object for grouping the mutable properties of an
+ Operation
+ type: object
+ properties:
+ dispatcher:
+ description: Type of dispatcher to apply for this operation
+ type: string
+ dispatcherRules:
+ description: Rules of dispatcher for this operation
+ type: string
+ defaultDelay:
+ description: Default delay in milliseconds to apply to mock responses on
+ this operation
+ type: integer
+ parameterConstraints:
+ description: Constraints that may apply to incoming parameters on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ ParameterConstraint:
+ description: Companion object for Operation that may be used to express constraints
+ on request parameters
+ required:
+ - name
+ type: object
+ properties:
+ name:
+ description: Parameter name
+ type: string
+ required:
+ description: Whether it's a required constraint
+ type: boolean
+ recopy:
+ description: Whether it's a recopy constraint
+ type: boolean
+ mustMatchRegexp:
+ description: Whether it's a regular expression matching constraint
+ type: string
+ in:
+ description: Parameter location
+ enum:
+ - path
+ - query
+ - header
+ type: string
+ Metadata:
+ description: Commodity object for holding metadata on any entity. This object
+ is inspired by Kubernetes metadata.
+ required:
+ - createdOn
+ - lastUpdate
+ type: object
+ properties:
+ createdOn:
+ description: Creation date of attached object
+ type: integer
+ lastUpdate:
+ description: Last update of attached object
+ type: integer
+ annotations:
+ description: Annotations of attached object
+ type: object
+ additionalProperties:
+ type: string
+ labels:
+ description: Labels put on attached object
+ type: object
+ additionalProperties:
+ type: string
+ LabelsMap:
+ description: A map which keys are already used labels keys and values are already
+ used values for this key
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/StringArray'
+ type: object
+ UnidirectionalEvent:
+ description: Representation of an unidirectional exchange as an event message
+ type: object
+ allOf:
+ - required:
+ - eventMessage
+ type: object
+ properties:
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Asynchronous message for this unidirectional event
+ - $ref: '#/components/schemas/AbstractExchange'
+ EventMessage:
+ description: ""
+ required:
+ - id
+ - mediaType
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this message
+ type: string
+ mediaType:
+ description: Content type of message
+ type: string
+ name:
+ description: Unique distinct name of this message
+ type: string
+ content:
+ description: Body content for this message
+ type: string
+ operationId:
+ description: Identifier of Operation this message is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this message is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this message
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ StringArray:
+ description: A simple array of String
+ type: array
+ items:
+ type: string
+ MessageArray:
+ description: Array of Message for Service operations
+ type: array
+ items:
+ $ref: '#/components/schemas/Exchange'
+ Exchange:
+ oneOf:
+ - $ref: '#/components/schemas/RequestResponsePair'
+ - $ref: '#/components/schemas/UnidirectionalEvent'
+ discriminator:
+ propertyName: type
+ mapping:
+ reqRespPair: '#/components/schemas/RequestResponsePair'
+ unidirEvent: '#/components/schemas/UnidirectionalEvent'
+ description: "Abstract representation of a Service or API exchange type (request/response,\
+ \ event based, ...)"
+ AbstractExchange:
+ description: Abstract bean representing a Service or API Exchange.
+ required:
+ - type
+ type: object
+ properties:
+ type:
+ description: Discriminant type for identifying kind of exchange
+ enum:
+ - reqRespPair
+ - unidirEvent
+ type: string
+ ServiceView:
+ description: Aggregate bean for grouping a Service an its messages pairs
+ required:
+ - service
+ - messagesMap
+ type: object
+ properties:
+ service:
+ $ref: '#/components/schemas/Service'
+ description: Wrapped service description
+ messagesMap:
+ description: "Map of messages for this Service. Keys are operation name,\
+ \ values are array of messages for this operation"
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MessageArray'
+ TestRequest:
+ description: Test request is a minimalist wrapper for requesting the launch
+ of a new test
+ required:
+ - serviceId
+ - testEndpoint
+ - runnerType
+ - timeout
+ properties:
+ serviceId:
+ description: Unique identifier of service to test
+ type: string
+ testEndpoint:
+ description: Endpoint to test for this service
+ type: string
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ filteredOperations:
+ description: A restriction on service operations to test
+ type: array
+ items:
+ type: string
+ operationHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ secretName:
+ description: The name of Secret to use for connecting the test endpoint
+ type: string
+ Resource:
+ description: "Resource represents a Service or API artifacts such as specification,\
+ \ contract"
+ required:
+ - id
+ - name
+ - content
+ - type
+ - serviceId
+ type: object
+ properties:
+ id:
+ description: Uniquer identifier of this Service or API Resource
+ type: string
+ name:
+ description: Unique name/business identifier for this Service or API resource
+ type: string
+ content:
+ description: String content of this resource
+ type: string
+ type:
+ $ref: '#/components/schemas/ResourceType'
+ description: Type of this Service or API resource
+ serviceId:
+ description: Unique identifier of the Servoce or API this resource is attached
+ to
+ type: string
+ path:
+ description: Relatvie path of this resource regarding main resource
+ type: string
+ sourceArtifact:
+ description: Short name of the artifact this resource was extracted from
+ type: string
+ Binding:
+ description: Protocol binding details for asynchronous operations
+ required:
+ - type
+ - destinationName
+ type: object
+ properties:
+ type:
+ description: Protocol binding identifier
+ enum:
+ - KAFKA
+ - MQTT
+ - WS
+ - AMQP
+ type: string
+ keyType:
+ description: Type of key for Kafka messages
+ type: string
+ destinationType:
+ description: Type of destination for asynchronous messages of this operation
+ type: string
+ destinationName:
+ description: Name of destination for asynchronous messages of this operation
+ type: string
+ qoS:
+ description: Quality of Service attribute for MQTT binding
+ type: string
+ persistent:
+ description: Persistent attribute for MQTT binding
+ type: boolean
+ method:
+ description: HTTP method for WebSocket binding
+ type: string
+ ImportJob:
+ description: An ImportJob allow defining a repository artifact to poll for discovering
+ Services and APIs mocks and tests
+ required:
+ - name
+ - repositoryUrl
+ properties:
+ id:
+ description: Unique identifier of ImportJob
+ type: string
+ name:
+ description: Unique distinct name of this ImportJob
+ type: string
+ repositoryUrl:
+ description: URL of mocks and tests repository artifact
+ type: string
+ repositoryDisableSSLValidation:
+ description: Whether to disable SSL certificate verification when checking
+ repository
+ type: boolean
+ frequency:
+ description: Reserved for future usage
+ type: string
+ createdDate:
+ format: date-time
+ description: Creation date for this ImportJob
+ type: string
+ lastImportDate:
+ format: date-time
+ description: Date last import was done
+ type: string
+ lastImportError:
+ description: Error message of last import (if any)
+ type: string
+ active:
+ description: Whether this ImportJob is active (ie. scheduled for execution)
+ type: boolean
+ etag:
+ description: Etag of repository URL during previous import. Is used for
+ not re-importing if no recent changes
+ type: string
+ serviceRefs:
+ description: References of Services discovered when checking repository
+ type: array
+ items:
+ $ref: '#/components/schemas/ServiceRef'
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of ImportJob
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: Reference of a Secret to used when checking repository
+ mainArtifact:
+ description: Flag telling if considered as primary or secondary artifact.
+ Default to `true`
+ type: boolean
+ TestRunnerType:
+ description: Type of test strategy (different strategies are implemented by
+ different runners)
+ enum:
+ - HTTP
+ - SOAP_HTTP
+ - SOAP_UI
+ - POSTMAN
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SCHEMA
+ - GRPC_PROTOBUF
+ - GRAPHQL_SCHEMA
+ type: string
+ ResourceType:
+ description: Types of managed resources for Services or APIs
+ enum:
+ - WSDL
+ - XSD
+ - JSON_SCHEMA
+ - OPEN_API_SPEC
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SPEC
+ - ASYNC_API_SCHEMA
+ - AVRO_SCHEMA
+ - PROTOBUF_SCHEMA
+ - PROTOBUF_DESCRIPTION
+ - GRAPHQL_SCHEMA
+ type: string
+ Operation:
+ description: An Operation of a Service or API
+ required:
+ - name
+ - method
+ type: object
+ properties:
+ name:
+ description: Unique name of this Operation within Service scope
+ type: string
+ method:
+ description: Represents transport method
+ type: string
+ inputName:
+ description: Name of input parameters in case of Xml based Service
+ type: string
+ outputName:
+ description: Name of output parameters in case of Xml based Service
+ type: string
+ dispatcher:
+ description: Dispatcher strategy used for mocks
+ type: string
+ dispatcherRules:
+ description: DispatcherRules used for mocks
+ type: string
+ defaultDelay:
+ description: Default response time delay for mocks
+ type: number
+ resourcePaths:
+ description: Paths the mocks endpoints are mapped on
+ type: array
+ items:
+ type: string
+ parameterContraints:
+ description: Contraints that may apply to mock invocatino on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ bindings:
+ description: Map of protocol binding details for this operation
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Binding'
+ ArtifactUpload:
+ description: |-
+ Artifact to be imported by Microcks.
+ This structure represents a mime-multipart file upload (as specified here: https://swagger.io/docs/specification/describing-request-body/file-upload/)
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The artifact to upload
+ type: string
+ Counter:
+ description: A simple Counter type.
+ type: object
+ properties:
+ counter:
+ format: int32
+ description: Number of items in a resource collection
+ type: integer
+ example: |-
+ {
+ "counter": 12
+ }
+ FeaturesConfig:
+ title: Root Type for FeaturesConfig
+ description: Representation of optional features configuration used by Microcks
+ server
+ type: object
+ properties:
+ repository-filter:
+ description: Repository filtering feature properties
+ type: object
+ properties:
+ label-label:
+ type: string
+ enabled:
+ type: string
+ label-list:
+ type: string
+ label-key:
+ type: string
+ microcks-hub:
+ description: Microcks Hub feature properties
+ type: object
+ properties:
+ allowed-roles:
+ type: string
+ endpoint:
+ type: string
+ enabled:
+ type: string
+ repository-tenancy:
+ description: Repository tenancy feature properties
+ type: object
+ properties:
+ enabled:
+ type: string
+ artifact-import-allowed-roles:
+ type: string
+ async-api:
+ description: Asynchronous feature properties
+ type: object
+ properties:
+ default-binding:
+ type: string
+ endpoint-MQTT:
+ type: string
+ endpoint-WS:
+ type: string
+ endpoint-KAFKA:
+ type: string
+ enabled:
+ type: string
+ frequencies:
+ type: string
+ additionalProperties: true
+ example:
+ repository-filter:
+ label-label: Domain
+ enabled: "true"
+ label-list: "domain,status"
+ label-key: domain
+ microcks-hub:
+ allowed-roles: "admin,manager,manager-any"
+ endpoint: https://hub.microcks.io/api
+ enabled: "true"
+ repository-tenancy:
+ enabled: "false"
+ artifact-import-allowed-roles: "admin,manager,manager-any"
+ async-api:
+ default-binding: KAFKA
+ endpoint-MQTT: my-mqtt-broker.apps.try.microcks.io
+ endpoint-WS: localhost:8081
+ endpoint-KAFKA: my-cluster-kafka-bootstrap.apps.try.microcks.io
+ enabled: "false"
+ frequencies: "3,10,30"
+ SnapshotUpload:
+ description: Upload of a repository snapshot file
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The repository snapshot file
+ type: string
+ HeaderDTO:
+ description: Data Transfert Object for headers of both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this header (comma separated strings)
+ type: string
+ OperationHeaders:
+ description: "Specification of additional headers for a Service/API operations.\
+ \ Keys are operation name or \"globals\" (if header applies to all), values\
+ \ are Header objects DTO."
+ type: object
+ additionalProperties:
+ type: array
+ items:
+ $ref: '#/components/schemas/HeaderDTO'
+ Service:
+ description: Represents a Service or API definition as registred into Microcks
+ repository
+ required:
+ - name
+ - version
+ - type
+ properties:
+ id:
+ description: Unique identifier for this Service or API
+ type: string
+ name:
+ description: Distinct name for this Service or API (maybe shared among many
+ versions)
+ type: string
+ version:
+ description: Distinct version for a named Service or API
+ type: string
+ type:
+ description: Service or API Type
+ enum:
+ - REST
+ - SOAP_HTTP
+ - GENERIC_REST
+ - GENERIC_EVENT
+ - EVENT
+ - GRPC
+ - GRAPHQL
+ type: string
+ operations:
+ description: Set of Operations for Service or API
+ type: array
+ items:
+ $ref: '#/components/schemas/Operation'
+ xmlNS:
+ description: Associated Xml Namespace in case of Xml based Service
+ type: string
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of Service
+ Trend:
+ description: Evolution trend qualifier
+ enum:
+ - DOWN
+ - LOW_DOWN
+ - STABLE
+ - LOW_UP
+ - UP
+ type: string
+ WeightedMetricValue:
+ description: Value of a metric with an associated weight
+ required:
+ - name
+ - weight
+ - value
+ type: object
+ properties:
+ name:
+ description: MEtric name or serie name
+ type: string
+ weight:
+ description: Weight of this metric value (typically a percentage)
+ type: integer
+ value:
+ description: The value of this metric
+ type: integer
+ DailyInvocationStatistic:
+ description: The daily statistic of a service mock invocations
+ required:
+ - id
+ - day
+ - serviceName
+ - serviceVersion
+ - dailyCount
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this statistic object
+ type: string
+ day:
+ description: The day (formatted as yyyyMMdd string) represented by this
+ statistic
+ type: string
+ serviceName:
+ description: The name of the service this statistic is related to
+ type: string
+ serviceVersion:
+ description: The version of the service this statistic is related to
+ type: string
+ dailyCount:
+ description: The number of service mock invocations on this day
+ type: number
+ hourlyCount:
+ description: The number of service mock invocations per hour of the day
+ (keys range from 0 to 23)
+ type: object
+ additionalProperties: true
+ minuteCount:
+ description: The number of service mock invocations per minute of the day
+ (keys range from 0 to 1439)
+ type: object
+ additionalProperties: true
+ TestConformanceMetric:
+ description: "Represents the test conformance metrics (current score, history\
+ \ and evolution trend) of a Service"
+ required:
+ - id
+ - serviceId
+ - currentScore
+ - maxPossibleScore
+ type: object
+ properties:
+ id:
+ description: Unique identifier of coverage metric
+ type: string
+ serviceId:
+ description: Unique identifier of the Service this metric is related to
+ type: string
+ aggregationLabelValue:
+ description: Value of the label used for metrics aggregation (if any)
+ type: string
+ maxPossibleScore:
+ format: double
+ description: Maximum conformance score that can be reached (depends on samples
+ expresiveness)
+ type: number
+ currentScore:
+ format: double
+ description: Current test conformance score for the related Service
+ type: number
+ lastUpdateDay:
+ description: The day of latest score update (in yyyyMMdd format)
+ type: string
+ latestTrend:
+ $ref: '#/components/schemas/Trend'
+ description: Evolution trend of currentScore
+ latestScores:
+ description: "History of latest scores (key is date with format yyyyMMdd,\
+ \ value is score as double)"
+ type: object
+ additionalProperties:
+ type: number
+ CounterMap:
+ description: A generic map of counter
+ type: object
+ additionalProperties:
+ format: integer
+ type: number
+ TestResultSummary:
+ description: 'Represents the summary result of a Service or API test run by
+ Microcks. '
+ required:
+ - id
+ - testDate
+ - serviceId
+ - success
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ testDate:
+ format: int64
+ description: Timestamp of creation date of this service
+ type: integer
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ TestResult:
+ description: "Represents the result of a Service or API test run by Microcks.\
+ \ Tests are related to a service and made of multiple test cases corresponding\
+ \ to each operations / actions composing service. Tests are run against a\
+ \ specific endpoint named testedEndpoint. It holds global markers telling\
+ \ if test still ran, is a success, how many times is has taken and so on ..."
+ required:
+ - id
+ - version
+ - testNumber
+ - testDate
+ - testedEndpoint
+ - serviceId
+ - success
+ - inProgress
+ - runnerType
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ version:
+ description: Revision number of this test
+ type: number
+ testNumber:
+ description: Incremental number for tracking number of tests of a service
+ type: number
+ testDate:
+ format: int64
+ description: Timestamp of creation date of this service
+ type: integer
+ testedEndpoint:
+ description: Endpoint used during test
+ type: string
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ elapsedTime:
+ description: Elapsed time in milliseconds since test beginning
+ type: number
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ inProgress:
+ description: Flag telling is test is still in progress
+ type: boolean
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ testCaseResults:
+ description: TestCase results associated to this test
+ type: array
+ items:
+ $ref: '#/components/schemas/TestCaseResult'
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: The referrence of the Secret used for connecting to test endpoint
+ operationHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ responses:
+ ServiceResponse:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/Service'
+ - $ref: '#/components/schemas/ServiceView'
+ description: ""
+ securitySchemes:
+ jwt-bearer:
+ flows:
+ clientCredentials:
+ tokenUrl: https://keycloak.example.com/auth/realms/microcks/protocol/openid-connect/token
+ refreshUrl: https://keycloak.example.com/auth/realms/microcks/protocol/openid-connect/token
+ scopes:
+ user: ""
+ manager: ""
+ admin: ""
+ type: oauth2
+ description: JWT Bearer acquired using OAuth 2 Authentication flow or Direct
+ Access Grant
+security:
+- jwt-bearer: []
+tags:
+- name: mock
+ description: Operations related to API and Services mocks
+- name: test
+ description: Operations related to API and Services tests
+- name: job
+ description: Operations related to Jobs for discovering mocks and tests
+- name: config
+ description: Operations related to configuration
+- name: metrics
+ description: Operations related to metrics
diff --git a/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.7.yaml b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.7.yaml
new file mode 100644
index 000000000..e467e6ec1
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.7.yaml
@@ -0,0 +1,2132 @@
+---
+openapi: 3.0.2
+info:
+ title: Microcks API v1.7
+ version: 1.7.1
+ description: "API offered by Microcks, the Kubernetes native tools for API and microservices\
+ \ mocking and testing (microcks.io)"
+ contact:
+ name: Laurent Broudoux
+ url: https://github.com/microcks
+ email: laurent@microcks.io
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0
+ x-logo:
+ backgroundColor: '#ffffff'
+ url: https://microcks.io/images/microcks-logo-blue.png
+servers:
+- url: http://microcks.example.com/api
+ description: ""
+paths:
+ /services:
+ summary: This path operations deal with Services
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: page
+ description: Page of Services to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of Services to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServices
+ summary: Get Services and APIs
+ /tests:
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestRequest'
+ required: true
+ tags:
+ - test
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Created TestResult (empty shell cause tests are executed asynchronously)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateTest
+ summary: Create a new Test
+ /services/count:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Services in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServicesCounter
+ summary: Get the Services counter
+ /jobs:
+ summary: This path operations deal with ImportJobs
+ get:
+ tags:
+ - job
+ parameters:
+ - name: page
+ description: Page of ImportJobs to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of ImportJobs to include in a
+ response (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ - name: name
+ description: Name like criterion for query
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ImportJob'
+ description: List of found ImportJobs
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobs
+ summary: Get ImportJobs
+ description: Retrieve a list of ImportJobs
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Created ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateImportJob
+ summary: Create ImportJob
+ description: Create a new ImportJob
+ /jobs/{id}:
+ summary: This path or subpaths operations deal with specific ImportJob having
+ given id
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Found ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ summary: Get ImportJob
+ description: Retrieve an ImportJob using its identifier
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Updated ImportJob
+ summary: Update ImportJob
+ description: Update an ImportJob
+ delete:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: ImportJob deleted
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: DeleteImportJob
+ summary: Delete ImportJob
+ description: Delete an ImportJob
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/activate:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: ImportJob is activated
+ security:
+ - jwt-bearer:
+ - user
+ operationId: ActivateImportJob
+ summary: Activate an ImportJob
+ description: "Make an ImportJob active, so that it is executed"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/start:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Started ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: StartImportJob
+ summary: Start an ImportJob
+ description: Starting an ImportJob forces it to immediatly import mock definitions
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/stop:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Stopped ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: StopImportJob
+ summary: Stop an ImportJob
+ description: "Stopping an ImportJob desactivate it, so that it won't execute\
+ \ at next schedule"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: messages
+ description: Whether to include details on services messages into result.
+ Default is false
+ schema:
+ type: boolean
+ in: query
+ responses:
+ "200":
+ $ref: '#/components/responses/ServiceResponse'
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetService
+ summary: Get Service
+ delete:
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: DeleteService
+ summary: Delete Service
+ description: Delete a Service
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /artifact/upload:
+ summary: Deals with artifacts to be imported by Microcks.
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/ArtifactUpload'
+ examples:
+ Artifact upload:
+ value: |
+ POST /api/artifact/upload HTTP/1.1
+ Host: microcks
+ User-Agent: curl/7.54.0
+ Accept: */*
+ Authorization: Bearer
+ Content-Length: 2743
+ Expect: 100-continue
+ Content-Type: multipart/form-data; boundary=------------------------8af8cbb56dd4bde0
+
+ --------------------------8af8cbb56dd4bde0
+ Content-Disposition: form-data; name="file"; filename="github.json"
+ Content-Type: application/octet-stream
+
+ THE ARTIFACT HERE
+
+ --------------------------8af8cbb56dd4bde0--
+ required: true
+ tags:
+ - job
+ parameters:
+ - name: mainArtifact
+ description: Flag telling if this should be considered as primary or secondary
+ artifact. Default to 'true'
+ schema:
+ type: boolean
+ in: query
+ required: true
+ responses:
+ "201":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact was imported and Service found
+ "204":
+ description: No file attribute found in uploaded data
+ "400":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact content is invalid and not understood
+ security:
+ - jwt-bearer:
+ - user
+ operationId: uploadArtifact
+ summary: Upload an artifact
+ description: Uploads an artifact to be imported by Microcks.
+ /jobs/count:
+ summary: Count ImportJobs
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of ImportJobs in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobCounter
+ summary: Get the ImportJobs counter
+ /secrets:
+ summary: This path operations deal with Secrets
+ get:
+ tags:
+ - config
+ parameters:
+ - name: page
+ description: Page of Secrets to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ required: false
+ - name: size
+ description: Size of a page. Maximum number of Secrets to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ required: false
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Secret'
+ description: List of found Secrets
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecrets
+ summary: Get Secrets
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ tags:
+ - config
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Created Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: CreateSecret
+ summary: Create a new Secret
+ /secrets/{id}:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Found Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetSecret
+ summary: Get Secret
+ description: Retrieve a Secret
+ put:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Updated Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: UpdateSecret
+ summary: Update Secret
+ description: Update a Secret
+ delete:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Secret has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: DeleteSecret
+ summary: Delete Secret
+ description: Delete a Secret
+ parameters:
+ - name: id
+ description: Unique identifier of Secret to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /secrets/count:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Secrets in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecretsCounter
+ summary: Get the Secrets counter
+ /tests/service/{serviceId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResult'
+ description: List of TestResults for the Service having the requested id
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByService
+ summary: Get TestResults by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/service/{serviceId}/count:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of TestResults for this Service in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByServiceCounter
+ summary: Get the TestResults for Service counter
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Requested TestResult
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResult
+ summary: Get TestResult
+ description: ""
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/messages/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RequestResponsePair'
+ description: List of request and response messages for this TestCase
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetMessagesByTestCase
+ summary: Get messages for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/testCaseResult:
+ post:
+ requestBody:
+ description: TestCase return wrapper object
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseReturnDTO'
+ required: true
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseResult'
+ description: TestCaseResult is reported
+ operationId: ReportTestCaseResult
+ summary: Report and create a new TestCaseResult
+ description: Report a TestCaseResult (typically used by a Test runner)
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /keycloak/config:
+ summary: Keycloak Authentification configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KeycloakConfig'
+ description: Get current configuration
+ operationId: GetKeycloakConfig
+ summary: Get authentification configuration
+ /services/{id}/operation:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OperationOverrideDTO'
+ required: true
+ tags:
+ - mock
+ parameters:
+ - name: operationName
+ description: Name of operation to update
+ schema:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ description: Operation has been updated
+ "500":
+ description: Operation cannot be updated
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: OverrideServiceOperation
+ summary: Override Service Operation
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}/metadata:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Metadata'
+ required: true
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service metadata has been updated
+ "500":
+ description: Update of metadata failed
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: UpdateServiceMetadata
+ summary: Update Service Metadata
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/labels:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LabelsMap'
+ description: "Already used labels: keys are label Keys, values are array\
+ \ of label Values"
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetServicesLabels
+ summary: Get the already used labels for Services
+ /services/search:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: queryMap
+ description: Map of criterion. Key can be simply 'name' with value as the
+ searched string. You can also search by label using keys like 'labels.x'
+ where 'x' is the label and value the label value
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services (filtered according search criteria)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: SearchServices
+ summary: Search for Services and APIs
+ /tests/{id}/events/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/UnidirectionalEvent'
+ description: List of event messages for this TestCase
+ operationId: GetEventsByTestCase
+ summary: Get events for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/{name}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Resource'
+ description: Retrieve the resource having this name
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResource
+ summary: Get Resource
+ parameters:
+ - name: name
+ description: Unique name/business identifier of the Service or API resource
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/service/{serviceId}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Resource'
+ description: List the resources attached to a Service or API
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResourcesByService
+ summary: Get Resources by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of the Service or API the resources are attached
+ to
+ schema:
+ type: string
+ in: path
+ required: true
+ /features/config:
+ summary: Optional features configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: Get features configuration
+ operationId: GetFeaturesConfiguration
+ summary: Get features configuration
+ /import:
+ summary: Deals with repository snapshot to import in Microcks
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/SnapshotUpload'
+ required: true
+ tags:
+ - mock
+ responses:
+ "201":
+ description: Snasphot has been correctly imported
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: importSnapshot
+ summary: Import a snapshot
+ description: Import a repository snapshot previsouly exported into Microcks
+ /export:
+ summary: Deals with repository snapshot to import from Microcks
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: serviceIds
+ description: List of service identifiers to export
+ schema:
+ type: array
+ items:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ headers:
+ Content-Disposition:
+ schema:
+ type: string
+ examples:
+ filename:
+ value: attachment; filename=microcks-repository.json
+ content:
+ application/json:
+ schema:
+ format: binary
+ type: string
+ description: Snapshot file representing the export of requested services
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: exportSnapshot
+ summary: Export a snapshot
+ description: Export a repostiory snapshot with requested services
+ /metrics/invocations/global:
+ summary: Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Aggregated invocation statistics for specified day
+ operationId: GetAggregatedInvocationsStats
+ summary: Get aggregated invocation statistics for a day
+ /metrics/conformance/aggregate:
+ summary: Aggregation of Test conformance metrics
+ get:
+ tags:
+ - metrics
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/WeightedMetricValue'
+ description: Get aggregated coverage metric value
+ operationId: GetConformanceMetricsAggregation
+ summary: Get aggregation of conformance metrics
+ /metrics/conformance/service/{serviceId}:
+ summary: Test Conformance metrics on API and Services
+ get:
+ tags:
+ - metrics
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestConformanceMetric'
+ description: Test coverage metric for Service
+ operationId: GetServiceTestConformanceMetric
+ summary: Get conformance metrics for a Service
+ parameters:
+ - name: serviceId
+ description: Unique Services identifier this metrics are related to
+ schema:
+ type: string
+ in: path
+ required: true
+ /metrics/invocations/top:
+ summary: Top Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ - name: limit
+ description: The number of top invoked mocks to return
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Top invocations for a defined day
+ operationId: GetTopIvnocationsStatsByDay
+ summary: Get top invocation statistics for a day
+ /metrics/invocations/{serviceName}/{serviceVersion}:
+ summary: Invocation Statistics for API and Services
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Invocation statistics for service for specified day
+ operationId: GetInvocationStatsByService
+ summary: Get invocation statistics for Service
+ parameters:
+ - name: serviceName
+ description: Name of service to get statistics for
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: serviceVersion
+ description: Version of service to get statistics for
+ schema:
+ type: string
+ in: path
+ required: true
+ /metrics/invocations/global/latest:
+ summary: Latest Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: limit
+ description: Number of days to get back in time. Default is 20.
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CounterMap'
+ description: A map where keys are day (formatted using yyyyMMdd pattern)
+ and values are counter of invocations on this day
+ operationId: GetLatestAggregatedInvocationsStats
+ summary: Get aggregated invocations statistics for latest days
+ /metrics/tests/latest:
+ summary: Lastest Test results across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: limit
+ description: Number of days to consider for test results to return. Default
+ is 7 (one week)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResultSummary'
+ description: Test results summary for specified last days.
+ operationId: GetLatestTestResults
+ summary: Get latest tests results
+components:
+ schemas:
+ TestCaseResult:
+ description: Companion objects for TestResult. Each TestCaseResult correspond
+ to a particuliar service operation / action reference by the operationName
+ field. TestCaseResults owns a collection of TestStepResults (one for every
+ request associated to service operation / action).
+ required:
+ - success
+ - elapsedTime
+ - operationName
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test case beginning
+ type: number
+ operationName:
+ description: Name of operation this test case is bound to
+ type: string
+ testStepResults:
+ description: Test steps associated to this test case
+ type: array
+ items:
+ $ref: '#/components/schemas/TestStepResult'
+ ServiceRef:
+ description: Lightweight reference of an existing Service
+ required:
+ - serviceId
+ - name
+ - version
+ properties:
+ serviceId:
+ description: Unique reference of a Service
+ type: string
+ name:
+ description: The Service name
+ type: string
+ version:
+ description: The Service version
+ type: string
+ SecretRef:
+ description: Lightweight reference for an existing Secret
+ required:
+ - secretId
+ - name
+ properties:
+ secretId:
+ description: Unique identifier or referenced Secret
+ type: string
+ name:
+ description: Distinct name of the referenced Secret
+ type: string
+ example: |-
+ {
+ "secretId": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal"
+ }
+ Secret:
+ description: A Secret allows grouping informations on how to access a restricted
+ resource such as a repsoitory URL. Secrets are typically used by ImpoortJobs.
+ required:
+ - name
+ - description
+ properties:
+ id:
+ description: Unique identifier of Secret
+ type: string
+ name:
+ description: Unique distinct name of Secret
+ type: string
+ username:
+ type: string
+ password:
+ type: string
+ token:
+ type: string
+ tokenHeader:
+ type: string
+ caCertPem:
+ type: string
+ description:
+ description: Description of this Secret
+ type: string
+ example: |-
+ {
+ "id": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal",
+ "description": "Gogs internal corporate repository",
+ "username": "team",
+ "password": "team",
+ "caCertPem": "-----BEGIN CERTIFICATE-----\nMIIC6jCCAdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu\nc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIwHhcNMTgwNzE4MTA0ODIyWhcNMjMwNzE3\nMTA0ODIzWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIw\nggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCyaP1jlpnm8WpfCSnUa8Qt\nhdUynOLLgElUtpWoW25wB9tO2ZmEj+fVsTyzEsW8+nfXXfRsBEzPm2ze9uEMTPTB\nAY0k7DbLZfjmF1lCckUvvh1rR/8hoPuXETjXUuOdtm7gRHTOxLQyH2Qi/q0DYJAn\nprKyRCLa35pRnykL6v4bHkqFnqDEho63i29XHhm2703moh4YCl1iYa2Rh6D44cjn\n8lBCq6o7zoZSmc/aBamRkQrfZYcolR8OUtDS4oEB0zMftmea2ycashsLEMB+Cq4r\n64NI2QM7qOxdTuXsDivHfLl7RTuWEOozGaJXoiPaGU/3d/KnY0gKJ2TC1KXt6Xjn\nAgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG\nSIb3DQEBCwUAA4IBAQCeUmxfUzw0VAFG6HvVYIsfvumiIvsSWmclGIZqNJyfMHFD\nMy6xzPRNNfWe5aumGTJsuIzuXfDRcdO7KmH1d2/5brkvWpxp6svVrYPvcoXjl4VN\nQR2mv5Di4KHfiiwvP3eeewjUZj+uREGqX2fcbJPHTPy32Kpb0H8Uy09BklhjC7QP\ngRAGexPhU1oBL/CoOwbHKcQ6dxs/y1SxzI8gXEtec4z62CroI13iT7U0UjSqFBE4\nKfrJombfz0d68781Z40ll+8my251ZNfbLBhQ3UHW0JnkBEQkE1aBorUoj2iakYvx\nA2qZh+8q2b8MwMb2YsQ0dlxKd6c4tN3lmMnO4bnd\n-----END CERTIFICATE-----"
+ }
+ TestCaseReturnDTO:
+ required:
+ - operationName
+ properties:
+ operationName:
+ description: Name of related operation for this TestCase
+ type: string
+ TestReturn:
+ description: TestReturn is used for wrapping the return code of a test step
+ execution
+ required:
+ - code
+ - elapsedTime
+ properties:
+ code:
+ description: "Return code for test (0 means Success, 1 means Failure)"
+ type: integer
+ elapsedTime:
+ format: int64
+ description: Elapsed time in milliseconds
+ type: integer
+ message:
+ description: Error message if any
+ type: string
+ request:
+ $ref: '#/components/schemas/Request'
+ description: Request sent for this test
+ response:
+ $ref: '#/components/schemas/Response'
+ description: Response returned for this test
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Event Message received for this test
+ Request:
+ description: A mock invocation or test request
+ required:
+ - name
+ - operationId
+ properties:
+ id:
+ description: Unique identifier of Request
+ type: string
+ name:
+ description: Unique distinct name of this Request
+ type: string
+ content:
+ description: Body content for this request
+ type: string
+ operationId:
+ description: Identifier of Operation this Request is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Request is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Request
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Response:
+ description: A mock invocation or test response
+ required:
+ - operationId
+ - name
+ properties:
+ operationId:
+ description: Identifier of Operation this Response is associated to
+ type: string
+ content:
+ description: Body content of this Response
+ type: string
+ id:
+ description: Unique identifier of Response
+ type: string
+ name:
+ description: Unique distinct name of this Response
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Response is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Response
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Header:
+ description: Transport headers for both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this Header
+ type: array
+ items:
+ type: string
+ TestStepResult:
+ description: TestStepResult is an entity embedded within TestCaseResult. They
+ are created for each request associated with an operation / action of a microservice.
+ required:
+ - success
+ - elapsedTome
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test step beginning
+ type: number
+ requestName:
+ description: Name of request this test step is bound to
+ type: string
+ message:
+ description: Error message that may be associated to this test step
+ type: string
+ eventMessageName:
+ description: Name of event this test step is bound to
+ type: string
+ KeycloakConfig:
+ description: Representation of Keycloak / SSO configuration used by Microcks
+ server
+ required:
+ - realm
+ - auth-server-url
+ - public-client
+ - ssl-required
+ - resource
+ - enabled
+ type: object
+ properties:
+ realm:
+ description: Authentication realm name
+ type: string
+ auth-server-url:
+ description: SSO Server authentication url
+ type: string
+ public-client:
+ description: Name of public-client that can be used for requesting OAuth
+ token
+ type: boolean
+ ssl-required:
+ description: SSL certificates requirements
+ enum:
+ - none
+ - external
+ resource:
+ description: Name of Keycloak resource/application used on client side
+ type: string
+ enabled:
+ description: Whether Keycloak authentification and usage is enabled
+ type: boolean
+ RequestResponsePair:
+ description: Request associated with corresponding Response
+ type: object
+ allOf:
+ - required:
+ - request
+ - response
+ type: object
+ properties:
+ request:
+ $ref: '#/components/schemas/Request'
+ description: The request part of the pair
+ response:
+ $ref: '#/components/schemas/Response'
+ description: The Response part of the pair
+ - $ref: '#/components/schemas/AbstractExchange'
+ OperationOverrideDTO:
+ description: Data Transfer object for grouping the mutable properties of an
+ Operation
+ type: object
+ properties:
+ dispatcher:
+ description: Type of dispatcher to apply for this operation
+ type: string
+ dispatcherRules:
+ description: Rules of dispatcher for this operation
+ type: string
+ defaultDelay:
+ description: Default delay in milliseconds to apply to mock responses on
+ this operation
+ type: integer
+ parameterConstraints:
+ description: Constraints that may apply to incoming parameters on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ ParameterConstraint:
+ description: Companion object for Operation that may be used to express constraints
+ on request parameters
+ required:
+ - name
+ type: object
+ properties:
+ name:
+ description: Parameter name
+ type: string
+ required:
+ description: Whether it's a required constraint
+ type: boolean
+ recopy:
+ description: Whether it's a recopy constraint
+ type: boolean
+ mustMatchRegexp:
+ description: Whether it's a regular expression matching constraint
+ type: string
+ in:
+ description: Parameter location
+ enum:
+ - path
+ - query
+ - header
+ type: string
+ Metadata:
+ description: Commodity object for holding metadata on any entity. This object
+ is inspired by Kubernetes metadata.
+ required:
+ - createdOn
+ - lastUpdate
+ type: object
+ properties:
+ createdOn:
+ description: Creation date of attached object
+ type: integer
+ lastUpdate:
+ description: Last update of attached object
+ type: integer
+ annotations:
+ description: Annotations of attached object
+ type: object
+ additionalProperties:
+ type: string
+ labels:
+ description: Labels put on attached object
+ type: object
+ additionalProperties:
+ type: string
+ LabelsMap:
+ description: A map which keys are already used labels keys and values are already
+ used values for this key
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/StringArray'
+ type: object
+ UnidirectionalEvent:
+ description: Representation of an unidirectional exchange as an event message
+ type: object
+ allOf:
+ - required:
+ - eventMessage
+ type: object
+ properties:
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Asynchronous message for this unidirectional event
+ - $ref: '#/components/schemas/AbstractExchange'
+ EventMessage:
+ description: ""
+ required:
+ - id
+ - mediaType
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this message
+ type: string
+ mediaType:
+ description: Content type of message
+ type: string
+ name:
+ description: Unique distinct name of this message
+ type: string
+ content:
+ description: Body content for this message
+ type: string
+ operationId:
+ description: Identifier of Operation this message is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this message is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this message
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ StringArray:
+ description: A simple array of String
+ type: array
+ items:
+ type: string
+ MessageArray:
+ description: Array of Message for Service operations
+ type: array
+ items:
+ $ref: '#/components/schemas/Exchange'
+ Exchange:
+ oneOf:
+ - $ref: '#/components/schemas/RequestResponsePair'
+ - $ref: '#/components/schemas/UnidirectionalEvent'
+ discriminator:
+ propertyName: type
+ mapping:
+ reqRespPair: '#/components/schemas/RequestResponsePair'
+ unidirEvent: '#/components/schemas/UnidirectionalEvent'
+ description: "Abstract representation of a Service or API exchange type (request/response,\
+ \ event based, ...)"
+ AbstractExchange:
+ description: Abstract bean representing a Service or API Exchange.
+ required:
+ - type
+ type: object
+ properties:
+ type:
+ description: Discriminant type for identifying kind of exchange
+ enum:
+ - reqRespPair
+ - unidirEvent
+ type: string
+ ServiceView:
+ description: Aggregate bean for grouping a Service an its messages pairs
+ required:
+ - service
+ - messagesMap
+ type: object
+ properties:
+ service:
+ $ref: '#/components/schemas/Service'
+ description: Wrapped service description
+ messagesMap:
+ description: "Map of messages for this Service. Keys are operation name,\
+ \ values are array of messages for this operation"
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MessageArray'
+ TestRequest:
+ description: Test request is a minimalist wrapper for requesting the launch
+ of a new test
+ required:
+ - serviceId
+ - testEndpoint
+ - runnerType
+ - timeout
+ properties:
+ serviceId:
+ description: Unique identifier of service to test
+ type: string
+ testEndpoint:
+ description: Endpoint to test for this service
+ type: string
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ filteredOperations:
+ description: A restriction on service operations to test
+ type: array
+ items:
+ type: string
+ operationHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ secretName:
+ description: The name of Secret to use for connecting the test endpoint
+ type: string
+ Resource:
+ description: "Resource represents a Service or API artifacts such as specification,\
+ \ contract"
+ required:
+ - id
+ - name
+ - content
+ - type
+ - serviceId
+ type: object
+ properties:
+ id:
+ description: Uniquer identifier of this Service or API Resource
+ type: string
+ name:
+ description: Unique name/business identifier for this Service or API resource
+ type: string
+ content:
+ description: String content of this resource
+ type: string
+ type:
+ $ref: '#/components/schemas/ResourceType'
+ description: Type of this Service or API resource
+ serviceId:
+ description: Unique identifier of the Servoce or API this resource is attached
+ to
+ type: string
+ path:
+ description: Relatvie path of this resource regarding main resource
+ type: string
+ sourceArtifact:
+ description: Short name of the artifact this resource was extracted from
+ type: string
+ ImportJob:
+ description: An ImportJob allow defining a repository artifact to poll for discovering
+ Services and APIs mocks and tests
+ required:
+ - name
+ - repositoryUrl
+ properties:
+ id:
+ description: Unique identifier of ImportJob
+ type: string
+ name:
+ description: Unique distinct name of this ImportJob
+ type: string
+ repositoryUrl:
+ description: URL of mocks and tests repository artifact
+ type: string
+ repositoryDisableSSLValidation:
+ description: Whether to disable SSL certificate verification when checking
+ repository
+ type: boolean
+ frequency:
+ description: Reserved for future usage
+ type: string
+ createdDate:
+ format: date-time
+ description: Creation date for this ImportJob
+ type: string
+ lastImportDate:
+ format: date-time
+ description: Date last import was done
+ type: string
+ lastImportError:
+ description: Error message of last import (if any)
+ type: string
+ active:
+ description: Whether this ImportJob is active (ie. scheduled for execution)
+ type: boolean
+ etag:
+ description: Etag of repository URL during previous import. Is used for
+ not re-importing if no recent changes
+ type: string
+ serviceRefs:
+ description: References of Services discovered when checking repository
+ type: array
+ items:
+ $ref: '#/components/schemas/ServiceRef'
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of ImportJob
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: Reference of a Secret to used when checking repository
+ mainArtifact:
+ description: Flag telling if considered as primary or secondary artifact.
+ Default to `true`
+ type: boolean
+ TestRunnerType:
+ description: Type of test strategy (different strategies are implemented by
+ different runners)
+ enum:
+ - HTTP
+ - SOAP_HTTP
+ - SOAP_UI
+ - POSTMAN
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SCHEMA
+ - GRPC_PROTOBUF
+ - GRAPHQL_SCHEMA
+ type: string
+ ResourceType:
+ description: Types of managed resources for Services or APIs
+ enum:
+ - WSDL
+ - XSD
+ - JSON_SCHEMA
+ - OPEN_API_SPEC
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SPEC
+ - ASYNC_API_SCHEMA
+ - AVRO_SCHEMA
+ - PROTOBUF_SCHEMA
+ - PROTOBUF_DESCRIPTION
+ - GRAPHQL_SCHEMA
+ - POSTMAN_COLLECTION
+ type: string
+ Operation:
+ description: An Operation of a Service or API
+ required:
+ - name
+ - method
+ type: object
+ properties:
+ name:
+ description: Unique name of this Operation within Service scope
+ type: string
+ method:
+ description: Represents transport method
+ type: string
+ inputName:
+ description: Name of input parameters in case of Xml based Service
+ type: string
+ outputName:
+ description: Name of output parameters in case of Xml based Service
+ type: string
+ dispatcher:
+ description: Dispatcher strategy used for mocks
+ type: string
+ dispatcherRules:
+ description: DispatcherRules used for mocks
+ type: string
+ defaultDelay:
+ description: Default response time delay for mocks
+ type: number
+ resourcePaths:
+ description: Paths the mocks endpoints are mapped on
+ type: array
+ items:
+ type: string
+ parameterContraints:
+ description: Contraints that may apply to mock invocatino on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ bindings:
+ description: Map of protocol binding details for this operation
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Binding'
+ ArtifactUpload:
+ description: |-
+ Artifact to be imported by Microcks.
+ This structure represents a mime-multipart file upload (as specified here: https://swagger.io/docs/specification/describing-request-body/file-upload/)
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The artifact to upload
+ type: string
+ Counter:
+ description: A simple Counter type.
+ type: object
+ properties:
+ counter:
+ format: int32
+ description: Number of items in a resource collection
+ type: integer
+ example: |-
+ {
+ "counter": 12
+ }
+ FeaturesConfig:
+ title: Root Type for FeaturesConfig
+ description: Representation of optional features configuration used by Microcks
+ server
+ type: object
+ properties:
+ repository-filter:
+ description: Repository filtering feature properties
+ type: object
+ properties:
+ label-label:
+ type: string
+ enabled:
+ type: string
+ label-list:
+ type: string
+ label-key:
+ type: string
+ microcks-hub:
+ description: Microcks Hub feature properties
+ type: object
+ properties:
+ allowed-roles:
+ type: string
+ endpoint:
+ type: string
+ enabled:
+ type: string
+ repository-tenancy:
+ description: Repository tenancy feature properties
+ type: object
+ properties:
+ enabled:
+ type: string
+ artifact-import-allowed-roles:
+ type: string
+ async-api:
+ description: Asynchronous feature properties
+ type: object
+ properties:
+ default-binding:
+ type: string
+ endpoint-MQTT:
+ type: string
+ endpoint-WS:
+ type: string
+ endpoint-KAFKA:
+ type: string
+ endpoint-AMQP:
+ type: string
+ endpoint-NATS:
+ type: string
+ endpoint-GOOGLEPUBSUB:
+ type: string
+ enabled:
+ type: string
+ frequencies:
+ type: string
+ additionalProperties: true
+ example:
+ repository-filter:
+ label-label: Domain
+ enabled: "true"
+ label-list: "domain,status"
+ label-key: domain
+ microcks-hub:
+ allowed-roles: "admin,manager,manager-any"
+ endpoint: https://hub.microcks.io/api
+ enabled: "true"
+ repository-tenancy:
+ enabled: "false"
+ artifact-import-allowed-roles: "admin,manager,manager-any"
+ async-api:
+ default-binding: KAFKA
+ endpoint-MQTT: my-mqtt-broker.apps.try.microcks.io
+ endpoint-WS: localhost:8081
+ endpoint-KAFKA: my-cluster-kafka-bootstrap.apps.try.microcks.io
+ enabled: "false"
+ frequencies: "3,10,30"
+ SnapshotUpload:
+ description: Upload of a repository snapshot file
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The repository snapshot file
+ type: string
+ HeaderDTO:
+ description: Data Transfert Object for headers of both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this header (comma separated strings)
+ type: string
+ OperationHeaders:
+ description: "Specification of additional headers for a Service/API operations.\
+ \ Keys are operation name or \"globals\" (if header applies to all), values\
+ \ are Header objects DTO."
+ type: object
+ additionalProperties:
+ type: array
+ items:
+ $ref: '#/components/schemas/HeaderDTO'
+ Service:
+ description: Represents a Service or API definition as registred into Microcks
+ repository
+ required:
+ - name
+ - version
+ - type
+ properties:
+ id:
+ description: Unique identifier for this Service or API
+ type: string
+ name:
+ description: Distinct name for this Service or API (maybe shared among many
+ versions)
+ type: string
+ version:
+ description: Distinct version for a named Service or API
+ type: string
+ type:
+ description: Service or API Type
+ enum:
+ - REST
+ - SOAP_HTTP
+ - GENERIC_REST
+ - GENERIC_EVENT
+ - EVENT
+ - GRPC
+ - GRAPHQL
+ type: string
+ operations:
+ description: Set of Operations for Service or API
+ type: array
+ items:
+ $ref: '#/components/schemas/Operation'
+ xmlNS:
+ description: Associated Xml Namespace in case of Xml based Service
+ type: string
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of Service
+ Trend:
+ description: Evolution trend qualifier
+ enum:
+ - DOWN
+ - LOW_DOWN
+ - STABLE
+ - LOW_UP
+ - UP
+ type: string
+ WeightedMetricValue:
+ description: Value of a metric with an associated weight
+ required:
+ - name
+ - weight
+ - value
+ type: object
+ properties:
+ name:
+ description: Metric name or serie name
+ type: string
+ weight:
+ description: Weight of this metric value (typically a percentage)
+ type: integer
+ value:
+ description: The value of this metric
+ type: integer
+ DailyInvocationStatistic:
+ description: The daily statistic of a service mock invocations
+ required:
+ - id
+ - day
+ - serviceName
+ - serviceVersion
+ - dailyCount
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this statistic object
+ type: string
+ day:
+ description: The day (formatted as yyyyMMdd string) represented by this
+ statistic
+ type: string
+ serviceName:
+ description: The name of the service this statistic is related to
+ type: string
+ serviceVersion:
+ description: The version of the service this statistic is related to
+ type: string
+ dailyCount:
+ description: The number of service mock invocations on this day
+ type: number
+ hourlyCount:
+ description: The number of service mock invocations per hour of the day
+ (keys range from 0 to 23)
+ type: object
+ additionalProperties: true
+ minuteCount:
+ description: The number of service mock invocations per minute of the day
+ (keys range from 0 to 1439)
+ type: object
+ additionalProperties: true
+ TestConformanceMetric:
+ description: "Represents the test conformance metrics (current score, history\
+ \ and evolution trend) of a Service"
+ required:
+ - id
+ - serviceId
+ - currentScore
+ - maxPossibleScore
+ type: object
+ properties:
+ id:
+ description: Unique identifier of coverage metric
+ type: string
+ serviceId:
+ description: Unique identifier of the Service this metric is related to
+ type: string
+ aggregationLabelValue:
+ description: Value of the label used for metrics aggregation (if any)
+ type: string
+ maxPossibleScore:
+ format: double
+ description: Maximum conformance score that can be reached (depends on samples
+ expresiveness)
+ type: number
+ currentScore:
+ format: double
+ description: Current test conformance score for the related Service
+ type: number
+ lastUpdateDay:
+ description: The day of latest score update (in yyyyMMdd format)
+ type: string
+ latestTrend:
+ $ref: '#/components/schemas/Trend'
+ description: Evolution trend of currentScore
+ latestScores:
+ description: "History of latest scores (key is date with format yyyyMMdd,\
+ \ value is score as double)"
+ type: object
+ additionalProperties:
+ type: number
+ CounterMap:
+ description: A generic map of counter
+ type: object
+ additionalProperties:
+ type: number
+ TestResultSummary:
+ description: 'Represents the summary result of a Service or API test run by
+ Microcks. '
+ required:
+ - id
+ - testDate
+ - serviceId
+ - success
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ testDate:
+ format: int64
+ description: Timestamp of creation date of this service
+ type: integer
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ TestResult:
+ description: "Represents the result of a Service or API test run by Microcks.\
+ \ Tests are related to a service and made of multiple test cases corresponding\
+ \ to each operations / actions composing service. Tests are run against a\
+ \ specific endpoint named testedEndpoint. It holds global markers telling\
+ \ if test still ran, is a success, how many times is has taken and so on ..."
+ required:
+ - id
+ - version
+ - testNumber
+ - testDate
+ - testedEndpoint
+ - serviceId
+ - success
+ - inProgress
+ - runnerType
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ version:
+ description: Revision number of this test
+ type: number
+ testNumber:
+ description: Incremental number for tracking number of tests of a service
+ type: number
+ testDate:
+ format: int64
+ description: Timestamp of creation date of this service
+ type: integer
+ testedEndpoint:
+ description: Endpoint used during test
+ type: string
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ elapsedTime:
+ description: Elapsed time in milliseconds since test beginning
+ type: number
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ inProgress:
+ description: Flag telling is test is still in progress
+ type: boolean
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ testCaseResults:
+ description: TestCase results associated to this test
+ type: array
+ items:
+ $ref: '#/components/schemas/TestCaseResult'
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: The referrence of the Secret used for connecting to test endpoint
+ operationHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ Binding:
+ description: Protocol binding details for asynchronous operations
+ required:
+ - type
+ - destinationName
+ type: object
+ properties:
+ type:
+ description: Protocol binding identifier
+ enum:
+ - KAFKA
+ - MQTT
+ - WS
+ - AMQP
+ - NATS
+ - GOOGLEPUBSUB
+ type: string
+ keyType:
+ description: Type of key for Kafka messages
+ type: string
+ destinationType:
+ description: Type of destination for asynchronous messages of this operation
+ type: string
+ destinationName:
+ description: Name of destination for asynchronous messages of this operation
+ type: string
+ qoS:
+ description: Quality of Service attribute for MQTT binding
+ type: string
+ persistent:
+ description: Persistent attribute for MQTT binding
+ type: boolean
+ method:
+ description: HTTP method for WebSocket binding
+ type: string
+ responses:
+ ServiceResponse:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/Service'
+ - $ref: '#/components/schemas/ServiceView'
+ description: ""
+ securitySchemes:
+ jwt-bearer:
+ flows:
+ clientCredentials:
+ tokenUrl: https://keycloak.example.com/realms/microcks/protocol/openid-connect/token
+ refreshUrl: https://keycloak.example.com/realms/microcks/protocol/openid-connect/token
+ scopes:
+ user: Simple authenticated user
+ manager: Services & APIs content manager
+ admin: Administrator of the Microcks instance
+ type: oauth2
+ description: JWT Bearer acquired using OAuth 2 Authentication flow or Direct
+ Access Grant
+security:
+- jwt-bearer: []
+tags:
+- name: mock
+ description: Operations related to API and Services mocks
+- name: test
+ description: Operations related to API and Services tests
+- name: job
+ description: Operations related to Jobs for discovering mocks and tests
+- name: config
+ description: Operations related to configuration
+- name: metrics
+ description: Operations related to metrics
diff --git a/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.8.yaml b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.8.yaml
new file mode 100644
index 000000000..20128f988
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.8.yaml
@@ -0,0 +1,2176 @@
+---
+openapi: 3.0.2
+info:
+ title: Microcks API v1.8
+ version: 1.8.1
+ description: "API offered by Microcks, the Kubernetes native tool for API and microservices\
+ \ mocking and testing (microcks.io)"
+ contact:
+ name: Laurent Broudoux
+ url: https://github.com/microcks
+ email: laurent@microcks.io
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0
+ x-logo:
+ backgroundColor: '#ffffff'
+ url: https://microcks.io/images/microcks-logo-blue.png
+servers:
+- url: http://microcks.example.com/api
+ description: ""
+paths:
+ /services:
+ summary: This path operations deal with Services
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: page
+ description: Page of Services to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of Services to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServices
+ summary: Get Services and APIs
+ /tests:
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestRequest'
+ required: true
+ tags:
+ - test
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Created TestResult (empty shell cause tests are executed asynchronously)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateTest
+ summary: Create a new Test
+ /services/count:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Services in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServicesCounter
+ summary: Get the Services counter
+ /jobs:
+ summary: This path operations deal with ImportJobs
+ get:
+ tags:
+ - job
+ parameters:
+ - name: page
+ description: Page of ImportJobs to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of ImportJobs to include in a
+ response (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ - name: name
+ description: Name like criterion for query
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ImportJob'
+ description: List of found ImportJobs
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobs
+ summary: Get ImportJobs
+ description: Retrieve a list of ImportJobs
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Created ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateImportJob
+ summary: Create ImportJob
+ description: Create a new ImportJob
+ /jobs/{id}:
+ summary: This path or subpaths operations deal with specific ImportJob having
+ given id
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Found ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ summary: Get ImportJob
+ description: Retrieve an ImportJob using its identifier
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Updated ImportJob
+ summary: Update ImportJob
+ description: Update an ImportJob
+ delete:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: ImportJob deleted
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: DeleteImportJob
+ summary: Delete ImportJob
+ description: Delete an ImportJob
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: messages
+ description: Whether to include details on services messages into result.
+ Default is false
+ schema:
+ type: boolean
+ in: query
+ responses:
+ "200":
+ $ref: '#/components/responses/ServiceResponse'
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetService
+ summary: Get Service
+ delete:
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: DeleteService
+ summary: Delete Service
+ description: Delete a Service
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /artifact/upload:
+ summary: Deals with artifacts to be imported by Microcks.
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/ArtifactUpload'
+ examples:
+ Artifact upload:
+ value: |
+ POST /api/artifact/upload HTTP/1.1
+ Host: microcks
+ User-Agent: curl/7.54.0
+ Accept: */*
+ Authorization: Bearer
+ Content-Length: 2743
+ Expect: 100-continue
+ Content-Type: multipart/form-data; boundary=------------------------8af8cbb56dd4bde0
+
+ --------------------------8af8cbb56dd4bde0
+ Content-Disposition: form-data; name="file"; filename="github.json"
+ Content-Type: application/octet-stream
+
+ THE ARTIFACT HERE
+
+ --------------------------8af8cbb56dd4bde0--
+ required: true
+ tags:
+ - job
+ parameters:
+ - name: mainArtifact
+ description: Flag telling if this should be considered as primary or secondary
+ artifact. Default to 'true'
+ schema:
+ type: boolean
+ in: query
+ required: true
+ responses:
+ "201":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact was imported and Service found
+ "204":
+ description: No file attribute found in uploaded data
+ "400":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact content is invalid and not understood
+ security:
+ - jwt-bearer:
+ - user
+ operationId: uploadArtifact
+ summary: Upload an artifact
+ description: Uploads an artifact to be imported by Microcks.
+ /jobs/count:
+ summary: Count ImportJobs
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of ImportJobs in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobCounter
+ summary: Get the ImportJobs counter
+ /secrets:
+ summary: This path operations deal with Secrets
+ get:
+ tags:
+ - config
+ parameters:
+ - name: page
+ description: Page of Secrets to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ required: false
+ - name: size
+ description: Size of a page. Maximum number of Secrets to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ required: false
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Secret'
+ description: List of found Secrets
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecrets
+ summary: Get Secrets
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ tags:
+ - config
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Created Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: CreateSecret
+ summary: Create a new Secret
+ /secrets/{id}:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Found Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetSecret
+ summary: Get Secret
+ description: Retrieve a Secret
+ put:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Updated Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: UpdateSecret
+ summary: Update Secret
+ description: Update a Secret
+ delete:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Secret has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: DeleteSecret
+ summary: Delete Secret
+ description: Delete a Secret
+ parameters:
+ - name: id
+ description: Unique identifier of Secret to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /secrets/count:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Secrets in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecretsCounter
+ summary: Get the Secrets counter
+ /tests/service/{serviceId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResult'
+ description: List of TestResults for the Service having the requested id
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByService
+ summary: Get TestResults by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/service/{serviceId}/count:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of TestResults for this Service in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByServiceCounter
+ summary: Get the TestResults for Service counter
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Requested TestResult
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResult
+ summary: Get TestResult
+ description: ""
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/messages/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RequestResponsePair'
+ description: List of request and response messages for this TestCase
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetMessagesByTestCase
+ summary: Get messages for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/testCaseResult:
+ post:
+ requestBody:
+ description: TestCase return wrapper object
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseReturnDTO'
+ required: true
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseResult'
+ description: TestCaseResult is reported
+ operationId: ReportTestCaseResult
+ summary: Report and create a new TestCaseResult
+ description: Report a TestCaseResult (typically used by a Test runner)
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /keycloak/config:
+ summary: Keycloak Authentification configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KeycloakConfig'
+ description: Get current configuration
+ operationId: GetKeycloakConfig
+ summary: Get authentification configuration
+ /services/{id}/operation:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OperationOverrideDTO'
+ required: true
+ tags:
+ - mock
+ parameters:
+ - name: operationName
+ description: Name of operation to update
+ schema:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ description: Operation has been updated
+ "500":
+ description: Operation cannot be updated
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: OverrideServiceOperation
+ summary: Override Service Operation
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}/metadata:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Metadata'
+ required: true
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service metadata has been updated
+ "500":
+ description: Update of metadata failed
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: UpdateServiceMetadata
+ summary: Update Service Metadata
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/search:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: queryMap
+ description: Map of criterion. Key can be simply 'name' with value as the
+ searched string. You can also search by label using keys like 'labels.x'
+ where 'x' is the label and value the label value
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services (filtered according search criteria)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: SearchServices
+ summary: Search for Services and APIs
+ /tests/{id}/events/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/UnidirectionalEvent'
+ description: List of event messages for this TestCase
+ operationId: GetEventsByTestCase
+ summary: Get events for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/{name}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Resource'
+ description: Retrieve the resource having this name
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResource
+ summary: Get Resource
+ parameters:
+ - name: name
+ description: Unique name/business identifier of the Service or API resource
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/service/{serviceId}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Resource'
+ description: List the resources attached to a Service or API
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResourcesByService
+ summary: Get Resources by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of the Service or API the resources are attached
+ to
+ schema:
+ type: string
+ in: path
+ required: true
+ /features/config:
+ summary: Optional features configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: Get features configuration
+ operationId: GetFeaturesConfiguration
+ summary: Get features configuration
+ /import:
+ summary: Deals with repository snapshot to import in Microcks
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/SnapshotUpload'
+ required: true
+ tags:
+ - mock
+ responses:
+ "201":
+ description: Snasphot has been correctly imported
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: importSnapshot
+ summary: Import a snapshot
+ description: Import a repository snapshot previsouly exported into Microcks
+ /export:
+ summary: Deals with repository snapshot to import from Microcks
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: serviceIds
+ description: List of service identifiers to export
+ schema:
+ type: array
+ items:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ headers:
+ Content-Disposition:
+ schema:
+ type: string
+ examples:
+ filename:
+ value: attachment; filename=microcks-repository.json
+ content:
+ application/json:
+ schema:
+ format: binary
+ type: string
+ description: Snapshot file representing the export of requested services
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: exportSnapshot
+ summary: Export a snapshot
+ description: Export a repostiory snapshot with requested services
+ /metrics/invocations/global:
+ summary: Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Aggregated invocation statistics for specified day
+ operationId: GetAggregatedInvocationsStats
+ summary: Get aggregated invocation statistics for a day
+ /metrics/conformance/aggregate:
+ summary: Aggregation of Test conformance metrics
+ get:
+ tags:
+ - metrics
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/WeightedMetricValue'
+ description: Get aggregated coverage metric value
+ operationId: GetConformanceMetricsAggregation
+ summary: Get aggregation of conformance metrics
+ /metrics/conformance/service/{serviceId}:
+ summary: Test Conformance metrics on API and Services
+ get:
+ tags:
+ - metrics
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestConformanceMetric'
+ description: Test coverage metric for Service
+ operationId: GetServiceTestConformanceMetric
+ summary: Get conformance metrics for a Service
+ parameters:
+ - name: serviceId
+ description: Unique Services identifier this metrics are related to
+ schema:
+ type: string
+ in: path
+ required: true
+ /metrics/invocations/top:
+ summary: Top Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ - name: limit
+ description: The number of top invoked mocks to return
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Top invocations for a defined day
+ operationId: GetTopIvnocationsStatsByDay
+ summary: Get top invocation statistics for a day
+ /metrics/invocations/{serviceName}/{serviceVersion}:
+ summary: Invocation Statistics for API and Services
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Invocation statistics for service for specified day
+ operationId: GetInvocationStatsByService
+ summary: Get invocation statistics for Service
+ parameters:
+ - name: serviceName
+ description: Name of service to get statistics for
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: serviceVersion
+ description: Version of service to get statistics for
+ schema:
+ type: string
+ in: path
+ required: true
+ /metrics/invocations/global/latest:
+ summary: Latest Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: limit
+ description: Number of days to get back in time. Default is 20.
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CounterMap'
+ description: A map where keys are day (formatted using yyyyMMdd pattern)
+ and values are counter of invocations on this day
+ operationId: GetLatestAggregatedInvocationsStats
+ summary: Get aggregated invocations statistics for latest days
+ /metrics/tests/latest:
+ summary: Lastest Test results across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: limit
+ description: Number of days to consider for test results to return. Default
+ is 7 (one week)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResultSummary'
+ description: Test results summary for specified last days.
+ operationId: GetLatestTestResults
+ summary: Get latest tests results
+ /jobs/{id}/start:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Started ImportJob
+ security:
+ - jwt-bearer:
+ - manager
+ - admin
+ operationId: StartImportJob
+ summary: Start an ImportJob
+ description: Starting an ImportJob forces it to immediatly import mock definitions
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/stop:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Stopped ImportJob
+ security:
+ - jwt-bearer:
+ - manager
+ - admin
+ operationId: StopImportJob
+ summary: Stop an ImportJob
+ description: "Stopping an ImportJob desactivate it, so that it won't execute\
+ \ at next schedule"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/activate:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: ImportJob is activated
+ security:
+ - jwt-bearer:
+ - manager
+ - admin
+ operationId: ActivateImportJob
+ summary: Activate an ImportJob
+ description: "Make an ImportJob active, so that it is executed"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/labels:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LabelsMap'
+ description: "Already used labels: keys are label Keys, values are array\
+ \ of label Values"
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServicesLabels
+ summary: Get the already used labels for Services
+components:
+ schemas:
+ TestCaseResult:
+ description: Companion objects for TestResult. Each TestCaseResult correspond
+ to a particuliar service operation / action reference by the operationName
+ field. TestCaseResults owns a collection of TestStepResults (one for every
+ request associated to service operation / action).
+ required:
+ - success
+ - elapsedTime
+ - operationName
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test case beginning
+ type: number
+ operationName:
+ description: Name of operation this test case is bound to
+ type: string
+ testStepResults:
+ description: Test steps associated to this test case
+ type: array
+ items:
+ $ref: '#/components/schemas/TestStepResult'
+ ServiceRef:
+ description: Lightweight reference of an existing Service
+ required:
+ - serviceId
+ - name
+ - version
+ properties:
+ serviceId:
+ description: Unique reference of a Service
+ type: string
+ name:
+ description: The Service name
+ type: string
+ version:
+ description: The Service version
+ type: string
+ SecretRef:
+ description: Lightweight reference for an existing Secret
+ required:
+ - secretId
+ - name
+ properties:
+ secretId:
+ description: Unique identifier or referenced Secret
+ type: string
+ name:
+ description: Distinct name of the referenced Secret
+ type: string
+ example: |-
+ {
+ "secretId": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal"
+ }
+ Secret:
+ description: A Secret allows grouping informations on how to access a restricted
+ resource such as a repsoitory URL. Secrets are typically used by ImpoortJobs.
+ required:
+ - name
+ - description
+ properties:
+ id:
+ description: Unique identifier of Secret
+ type: string
+ name:
+ description: Unique distinct name of Secret
+ type: string
+ username:
+ type: string
+ password:
+ type: string
+ token:
+ type: string
+ tokenHeader:
+ type: string
+ caCertPem:
+ type: string
+ description:
+ description: Description of this Secret
+ type: string
+ example: |-
+ {
+ "id": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal",
+ "description": "Gogs internal corporate repository",
+ "username": "team",
+ "password": "team",
+ "caCertPem": "-----BEGIN CERTIFICATE-----\nMIIC6jCCAdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu\nc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIwHhcNMTgwNzE4MTA0ODIyWhcNMjMwNzE3\nMTA0ODIzWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIw\nggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCyaP1jlpnm8WpfCSnUa8Qt\nhdUynOLLgElUtpWoW25wB9tO2ZmEj+fVsTyzEsW8+nfXXfRsBEzPm2ze9uEMTPTB\nAY0k7DbLZfjmF1lCckUvvh1rR/8hoPuXETjXUuOdtm7gRHTOxLQyH2Qi/q0DYJAn\nprKyRCLa35pRnykL6v4bHkqFnqDEho63i29XHhm2703moh4YCl1iYa2Rh6D44cjn\n8lBCq6o7zoZSmc/aBamRkQrfZYcolR8OUtDS4oEB0zMftmea2ycashsLEMB+Cq4r\n64NI2QM7qOxdTuXsDivHfLl7RTuWEOozGaJXoiPaGU/3d/KnY0gKJ2TC1KXt6Xjn\nAgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG\nSIb3DQEBCwUAA4IBAQCeUmxfUzw0VAFG6HvVYIsfvumiIvsSWmclGIZqNJyfMHFD\nMy6xzPRNNfWe5aumGTJsuIzuXfDRcdO7KmH1d2/5brkvWpxp6svVrYPvcoXjl4VN\nQR2mv5Di4KHfiiwvP3eeewjUZj+uREGqX2fcbJPHTPy32Kpb0H8Uy09BklhjC7QP\ngRAGexPhU1oBL/CoOwbHKcQ6dxs/y1SxzI8gXEtec4z62CroI13iT7U0UjSqFBE4\nKfrJombfz0d68781Z40ll+8my251ZNfbLBhQ3UHW0JnkBEQkE1aBorUoj2iakYvx\nA2qZh+8q2b8MwMb2YsQ0dlxKd6c4tN3lmMnO4bnd\n-----END CERTIFICATE-----"
+ }
+ TestCaseReturnDTO:
+ required:
+ - operationName
+ properties:
+ operationName:
+ description: Name of related operation for this TestCase
+ type: string
+ TestReturn:
+ description: TestReturn is used for wrapping the return code of a test step
+ execution
+ required:
+ - code
+ - elapsedTime
+ properties:
+ code:
+ description: "Return code for test (0 means Success, 1 means Failure)"
+ type: integer
+ elapsedTime:
+ format: int64
+ description: Elapsed time in milliseconds
+ type: integer
+ message:
+ description: Error message if any
+ type: string
+ request:
+ $ref: '#/components/schemas/Request'
+ description: Request sent for this test
+ response:
+ $ref: '#/components/schemas/Response'
+ description: Response returned for this test
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Event Message received for this test
+ Request:
+ description: A mock invocation or test request
+ required:
+ - name
+ - operationId
+ properties:
+ id:
+ description: Unique identifier of Request
+ type: string
+ name:
+ description: Unique distinct name of this Request
+ type: string
+ content:
+ description: Body content for this request
+ type: string
+ operationId:
+ description: Identifier of Operation this Request is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Request is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Request
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Response:
+ description: A mock invocation or test response
+ required:
+ - operationId
+ - name
+ properties:
+ operationId:
+ description: Identifier of Operation this Response is associated to
+ type: string
+ content:
+ description: Body content of this Response
+ type: string
+ id:
+ description: Unique identifier of Response
+ type: string
+ name:
+ description: Unique distinct name of this Response
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Response is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Response
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Header:
+ description: Transport headers for both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this Header
+ type: array
+ items:
+ type: string
+ TestStepResult:
+ description: TestStepResult is an entity embedded within TestCaseResult. They
+ are created for each request associated with an operation / action of a microservice.
+ required:
+ - success
+ - elapsedTome
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test step beginning
+ type: number
+ requestName:
+ description: Name of request this test step is bound to
+ type: string
+ message:
+ description: Error message that may be associated to this test step
+ type: string
+ eventMessageName:
+ description: Name of event this test step is bound to
+ type: string
+ KeycloakConfig:
+ description: Representation of Keycloak / SSO configuration used by Microcks
+ server
+ required:
+ - realm
+ - auth-server-url
+ - public-client
+ - ssl-required
+ - resource
+ - enabled
+ type: object
+ properties:
+ realm:
+ description: Authentication realm name
+ type: string
+ auth-server-url:
+ description: SSO Server authentication url
+ type: string
+ public-client:
+ description: Name of public-client that can be used for requesting OAuth
+ token
+ type: boolean
+ ssl-required:
+ description: SSL certificates requirements
+ enum:
+ - none
+ - external
+ resource:
+ description: Name of Keycloak resource/application used on client side
+ type: string
+ enabled:
+ description: Whether Keycloak authentification and usage is enabled
+ type: boolean
+ RequestResponsePair:
+ description: Request associated with corresponding Response
+ type: object
+ allOf:
+ - required:
+ - request
+ - response
+ type: object
+ properties:
+ request:
+ $ref: '#/components/schemas/Request'
+ description: The request part of the pair
+ response:
+ $ref: '#/components/schemas/Response'
+ description: The Response part of the pair
+ - $ref: '#/components/schemas/AbstractExchange'
+ OperationOverrideDTO:
+ description: Data Transfer object for grouping the mutable properties of an
+ Operation
+ type: object
+ properties:
+ dispatcher:
+ description: Type of dispatcher to apply for this operation
+ type: string
+ dispatcherRules:
+ description: Rules of dispatcher for this operation
+ type: string
+ defaultDelay:
+ description: Default delay in milliseconds to apply to mock responses on
+ this operation
+ type: integer
+ parameterConstraints:
+ description: Constraints that may apply to incoming parameters on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ ParameterConstraint:
+ description: Companion object for Operation that may be used to express constraints
+ on request parameters
+ required:
+ - name
+ type: object
+ properties:
+ name:
+ description: Parameter name
+ type: string
+ required:
+ description: Whether it's a required constraint
+ type: boolean
+ recopy:
+ description: Whether it's a recopy constraint
+ type: boolean
+ mustMatchRegexp:
+ description: Whether it's a regular expression matching constraint
+ type: string
+ in:
+ description: Parameter location
+ enum:
+ - path
+ - query
+ - header
+ type: string
+ Metadata:
+ description: Commodity object for holding metadata on any entity. This object
+ is inspired by Kubernetes metadata.
+ required:
+ - createdOn
+ - lastUpdate
+ type: object
+ properties:
+ createdOn:
+ description: Creation date of attached object
+ type: integer
+ lastUpdate:
+ description: Last update of attached object
+ type: integer
+ annotations:
+ description: Annotations of attached object
+ type: object
+ additionalProperties:
+ type: string
+ labels:
+ description: Labels put on attached object
+ type: object
+ additionalProperties:
+ type: string
+ LabelsMap:
+ description: A map which keys are already used labels keys and values are already
+ used values for this key
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/StringArray'
+ type: object
+ UnidirectionalEvent:
+ description: Representation of an unidirectional exchange as an event message
+ type: object
+ allOf:
+ - required:
+ - eventMessage
+ type: object
+ properties:
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Asynchronous message for this unidirectional event
+ - $ref: '#/components/schemas/AbstractExchange'
+ EventMessage:
+ description: ""
+ required:
+ - id
+ - mediaType
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this message
+ type: string
+ mediaType:
+ description: Content type of message
+ type: string
+ name:
+ description: Unique distinct name of this message
+ type: string
+ content:
+ description: Body content for this message
+ type: string
+ operationId:
+ description: Identifier of Operation this message is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this message is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this message
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ StringArray:
+ description: A simple array of String
+ type: array
+ items:
+ type: string
+ MessageArray:
+ description: Array of Message for Service operations
+ type: array
+ items:
+ $ref: '#/components/schemas/Exchange'
+ Exchange:
+ oneOf:
+ - $ref: '#/components/schemas/RequestResponsePair'
+ - $ref: '#/components/schemas/UnidirectionalEvent'
+ discriminator:
+ propertyName: type
+ mapping:
+ reqRespPair: '#/components/schemas/RequestResponsePair'
+ unidirEvent: '#/components/schemas/UnidirectionalEvent'
+ description: "Abstract representation of a Service or API exchange type (request/response,\
+ \ event based, ...)"
+ AbstractExchange:
+ description: Abstract bean representing a Service or API Exchange.
+ required:
+ - type
+ type: object
+ properties:
+ type:
+ description: Discriminant type for identifying kind of exchange
+ enum:
+ - reqRespPair
+ - unidirEvent
+ type: string
+ ServiceView:
+ description: Aggregate bean for grouping a Service an its messages pairs
+ required:
+ - service
+ - messagesMap
+ type: object
+ properties:
+ service:
+ $ref: '#/components/schemas/Service'
+ description: Wrapped service description
+ messagesMap:
+ description: "Map of messages for this Service. Keys are operation name,\
+ \ values are array of messages for this operation"
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MessageArray'
+ TestRequest:
+ description: Test request is a minimalist wrapper for requesting the launch
+ of a new test
+ required:
+ - serviceId
+ - testEndpoint
+ - runnerType
+ - timeout
+ properties:
+ serviceId:
+ description: Unique identifier of service to test
+ type: string
+ testEndpoint:
+ description: Endpoint to test for this service
+ type: string
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ filteredOperations:
+ description: A restriction on service operations to test
+ type: array
+ items:
+ type: string
+ secretName:
+ description: The name of Secret to use for connecting the test endpoint
+ type: string
+ oAuth2Context:
+ $ref: '#/components/schemas/OAuth2ClientContent'
+ description: An OAuth2 context to use for retrieving an access token prior
+ invoking the tested endpoint
+ operationsHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ Resource:
+ description: "Resource represents a Service or API artifacts such as specification,\
+ \ contract"
+ required:
+ - id
+ - name
+ - content
+ - type
+ - serviceId
+ type: object
+ properties:
+ id:
+ description: Uniquer identifier of this Service or API Resource
+ type: string
+ name:
+ description: Unique name/business identifier for this Service or API resource
+ type: string
+ content:
+ description: String content of this resource
+ type: string
+ type:
+ $ref: '#/components/schemas/ResourceType'
+ description: Type of this Service or API resource
+ serviceId:
+ description: Unique identifier of the Servoce or API this resource is attached
+ to
+ type: string
+ path:
+ description: Relatvie path of this resource regarding main resource
+ type: string
+ sourceArtifact:
+ description: Short name of the artifact this resource was extracted from
+ type: string
+ ImportJob:
+ description: An ImportJob allow defining a repository artifact to poll for discovering
+ Services and APIs mocks and tests
+ required:
+ - name
+ - repositoryUrl
+ properties:
+ id:
+ description: Unique identifier of ImportJob
+ type: string
+ name:
+ description: Unique distinct name of this ImportJob
+ type: string
+ repositoryUrl:
+ description: URL of mocks and tests repository artifact
+ type: string
+ repositoryDisableSSLValidation:
+ description: Whether to disable SSL certificate verification when checking
+ repository
+ type: boolean
+ frequency:
+ description: Reserved for future usage
+ type: string
+ createdDate:
+ format: date-time
+ description: Creation date for this ImportJob
+ type: string
+ lastImportDate:
+ format: date-time
+ description: Date last import was done
+ type: string
+ lastImportError:
+ description: Error message of last import (if any)
+ type: string
+ active:
+ description: Whether this ImportJob is active (ie. scheduled for execution)
+ type: boolean
+ etag:
+ description: Etag of repository URL during previous import. Is used for
+ not re-importing if no recent changes
+ type: string
+ serviceRefs:
+ description: References of Services discovered when checking repository
+ type: array
+ items:
+ $ref: '#/components/schemas/ServiceRef'
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of ImportJob
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: Reference of a Secret to used when checking repository
+ mainArtifact:
+ description: Flag telling if considered as primary or secondary artifact.
+ Default to `true`
+ type: boolean
+ TestRunnerType:
+ description: Type of test strategy (different strategies are implemented by
+ different runners)
+ enum:
+ - HTTP
+ - SOAP_HTTP
+ - SOAP_UI
+ - POSTMAN
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SCHEMA
+ - GRPC_PROTOBUF
+ - GRAPHQL_SCHEMA
+ type: string
+ Operation:
+ description: An Operation of a Service or API
+ required:
+ - name
+ - method
+ type: object
+ properties:
+ name:
+ description: Unique name of this Operation within Service scope
+ type: string
+ method:
+ description: Represents transport method
+ type: string
+ inputName:
+ description: Name of input parameters in case of Xml based Service
+ type: string
+ outputName:
+ description: Name of output parameters in case of Xml based Service
+ type: string
+ dispatcher:
+ description: Dispatcher strategy used for mocks
+ type: string
+ dispatcherRules:
+ description: DispatcherRules used for mocks
+ type: string
+ defaultDelay:
+ description: Default response time delay for mocks
+ type: number
+ resourcePaths:
+ description: Paths the mocks endpoints are mapped on
+ type: array
+ items:
+ type: string
+ parameterContraints:
+ description: Contraints that may apply to mock invocatino on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ bindings:
+ description: Map of protocol binding details for this operation
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Binding'
+ ArtifactUpload:
+ description: |-
+ Artifact to be imported by Microcks.
+ This structure represents a mime-multipart file upload (as specified here: https://swagger.io/docs/specification/describing-request-body/file-upload/)
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The artifact to upload
+ type: string
+ Counter:
+ description: A simple Counter type.
+ type: object
+ properties:
+ counter:
+ format: int32
+ description: Number of items in a resource collection
+ type: integer
+ example: |-
+ {
+ "counter": 12
+ }
+ FeaturesConfig:
+ title: Root Type for FeaturesConfig
+ description: Representation of optional features configuration used by Microcks
+ server
+ type: object
+ properties:
+ repository-filter:
+ description: Repository filtering feature properties
+ type: object
+ properties:
+ label-label:
+ type: string
+ enabled:
+ type: string
+ label-list:
+ type: string
+ label-key:
+ type: string
+ microcks-hub:
+ description: Microcks Hub feature properties
+ type: object
+ properties:
+ allowed-roles:
+ type: string
+ endpoint:
+ type: string
+ enabled:
+ type: string
+ repository-tenancy:
+ description: Repository tenancy feature properties
+ type: object
+ properties:
+ enabled:
+ type: string
+ artifact-import-allowed-roles:
+ type: string
+ async-api:
+ description: Asynchronous feature properties
+ type: object
+ properties:
+ default-binding:
+ type: string
+ endpoint-MQTT:
+ type: string
+ endpoint-WS:
+ type: string
+ endpoint-KAFKA:
+ type: string
+ endpoint-AMQP:
+ type: string
+ endpoint-NATS:
+ type: string
+ endpoint-GOOGLEPUBSUB:
+ type: string
+ enabled:
+ type: string
+ frequencies:
+ type: string
+ additionalProperties: true
+ example:
+ repository-filter:
+ label-label: Domain
+ enabled: "true"
+ label-list: "domain,status"
+ label-key: domain
+ microcks-hub:
+ allowed-roles: "admin,manager,manager-any"
+ endpoint: https://hub.microcks.io/api
+ enabled: "true"
+ repository-tenancy:
+ enabled: "false"
+ artifact-import-allowed-roles: "admin,manager,manager-any"
+ async-api:
+ default-binding: KAFKA
+ endpoint-MQTT: my-mqtt-broker.apps.try.microcks.io
+ endpoint-WS: localhost:8081
+ endpoint-KAFKA: my-cluster-kafka-bootstrap.apps.try.microcks.io
+ enabled: "false"
+ frequencies: "3,10,30"
+ SnapshotUpload:
+ description: Upload of a repository snapshot file
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The repository snapshot file
+ type: string
+ HeaderDTO:
+ description: Data Transfert Object for headers of both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this header (comma separated strings)
+ type: string
+ OperationHeaders:
+ description: "Specification of additional headers for a Service/API operations.\
+ \ Keys are operation name or \"globals\" (if header applies to all), values\
+ \ are Header objects DTO."
+ type: object
+ additionalProperties:
+ type: array
+ items:
+ $ref: '#/components/schemas/HeaderDTO'
+ Service:
+ description: Represents a Service or API definition as registred into Microcks
+ repository
+ required:
+ - name
+ - version
+ - type
+ properties:
+ id:
+ description: Unique identifier for this Service or API
+ type: string
+ name:
+ description: Distinct name for this Service or API (maybe shared among many
+ versions)
+ type: string
+ version:
+ description: Distinct version for a named Service or API
+ type: string
+ type:
+ description: Service or API Type
+ enum:
+ - REST
+ - SOAP_HTTP
+ - GENERIC_REST
+ - GENERIC_EVENT
+ - EVENT
+ - GRPC
+ - GRAPHQL
+ type: string
+ operations:
+ description: Set of Operations for Service or API
+ type: array
+ items:
+ $ref: '#/components/schemas/Operation'
+ xmlNS:
+ description: Associated Xml Namespace in case of Xml based Service
+ type: string
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of Service
+ Trend:
+ description: Evolution trend qualifier
+ enum:
+ - DOWN
+ - LOW_DOWN
+ - STABLE
+ - LOW_UP
+ - UP
+ type: string
+ WeightedMetricValue:
+ description: Value of a metric with an associated weight
+ required:
+ - name
+ - weight
+ - value
+ type: object
+ properties:
+ name:
+ description: Metric name or serie name
+ type: string
+ weight:
+ description: Weight of this metric value (typically a percentage)
+ type: integer
+ value:
+ description: The value of this metric
+ type: integer
+ DailyInvocationStatistic:
+ description: The daily statistic of a service mock invocations
+ required:
+ - id
+ - day
+ - serviceName
+ - serviceVersion
+ - dailyCount
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this statistic object
+ type: string
+ day:
+ description: The day (formatted as yyyyMMdd string) represented by this
+ statistic
+ type: string
+ serviceName:
+ description: The name of the service this statistic is related to
+ type: string
+ serviceVersion:
+ description: The version of the service this statistic is related to
+ type: string
+ dailyCount:
+ description: The number of service mock invocations on this day
+ type: number
+ hourlyCount:
+ description: The number of service mock invocations per hour of the day
+ (keys range from 0 to 23)
+ type: object
+ additionalProperties: true
+ minuteCount:
+ description: The number of service mock invocations per minute of the day
+ (keys range from 0 to 1439)
+ type: object
+ additionalProperties: true
+ TestConformanceMetric:
+ description: "Represents the test conformance metrics (current score, history\
+ \ and evolution trend) of a Service"
+ required:
+ - id
+ - serviceId
+ - currentScore
+ - maxPossibleScore
+ type: object
+ properties:
+ id:
+ description: Unique identifier of coverage metric
+ type: string
+ serviceId:
+ description: Unique identifier of the Service this metric is related to
+ type: string
+ aggregationLabelValue:
+ description: Value of the label used for metrics aggregation (if any)
+ type: string
+ maxPossibleScore:
+ format: double
+ description: Maximum conformance score that can be reached (depends on samples
+ expresiveness)
+ type: number
+ currentScore:
+ format: double
+ description: Current test conformance score for the related Service
+ type: number
+ lastUpdateDay:
+ description: The day of latest score update (in yyyyMMdd format)
+ type: string
+ latestTrend:
+ $ref: '#/components/schemas/Trend'
+ description: Evolution trend of currentScore
+ latestScores:
+ description: "History of latest scores (key is date with format yyyyMMdd,\
+ \ value is score as double)"
+ type: object
+ additionalProperties:
+ type: number
+ TestResultSummary:
+ description: 'Represents the summary result of a Service or API test run by
+ Microcks. '
+ required:
+ - id
+ - testDate
+ - serviceId
+ - success
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ testDate:
+ format: int64
+ description: Timestamp of creation date of this service
+ type: integer
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ TestResult:
+ description: "Represents the result of a Service or API test run by Microcks.\
+ \ Tests are related to a service and made of multiple test cases corresponding\
+ \ to each operations / actions composing service. Tests are run against a\
+ \ specific endpoint named testedEndpoint. It holds global markers telling\
+ \ if test still ran, is a success, how many times is has taken and so on ..."
+ required:
+ - id
+ - version
+ - testNumber
+ - testDate
+ - testedEndpoint
+ - serviceId
+ - success
+ - inProgress
+ - runnerType
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ version:
+ description: Revision number of this test
+ type: number
+ testNumber:
+ description: Incremental number for tracking number of tests of a service
+ type: number
+ testDate:
+ format: int64
+ description: Timestamp of creation date of this service
+ type: integer
+ testedEndpoint:
+ description: Endpoint used during test
+ type: string
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ elapsedTime:
+ description: Elapsed time in milliseconds since test beginning
+ type: number
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ inProgress:
+ description: Flag telling is test is still in progress
+ type: boolean
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ testCaseResults:
+ description: TestCase results associated to this test
+ type: array
+ items:
+ $ref: '#/components/schemas/TestCaseResult'
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: The referrence of the Secret used for connecting to test endpoint
+ operationHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ Binding:
+ description: Protocol binding details for asynchronous operations
+ required:
+ - type
+ - destinationName
+ type: object
+ properties:
+ type:
+ description: Protocol binding identifier
+ enum:
+ - KAFKA
+ - MQTT
+ - WS
+ - AMQP
+ - NATS
+ - GOOGLEPUBSUB
+ type: string
+ keyType:
+ description: Type of key for Kafka messages
+ type: string
+ destinationType:
+ description: Type of destination for asynchronous messages of this operation
+ type: string
+ destinationName:
+ description: Name of destination for asynchronous messages of this operation
+ type: string
+ qoS:
+ description: Quality of Service attribute for MQTT binding
+ type: string
+ persistent:
+ description: Persistent attribute for MQTT binding
+ type: boolean
+ method:
+ description: HTTP method for WebSocket binding
+ type: string
+ ResourceType:
+ description: Types of managed resources for Services or APIs
+ enum:
+ - WSDL
+ - XSD
+ - JSON_SCHEMA
+ - OPEN_API_SPEC
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SPEC
+ - ASYNC_API_SCHEMA
+ - AVRO_SCHEMA
+ - PROTOBUF_SCHEMA
+ - PROTOBUF_DESCRIPTION
+ - GRAPHQL_SCHEMA
+ - POSTMAN_COLLECTION
+ type: string
+ CounterMap:
+ description: A generic map of counter
+ type: object
+ additionalProperties:
+ type: number
+ OAuth2ClientContent:
+ description: Represents a volatile OAuth2 client context usually associated
+ with a Test request
+ required:
+ - clientId
+ - clientSecret
+ - tokenUri
+ type: object
+ properties:
+ clientId:
+ description: Id for connecting to OAuth2 identity provider
+ type: string
+ clientSecret:
+ format: password
+ description: Secret for connecting to OAuth2 identity provider
+ type: string
+ tokenUri:
+ description: URI for retrieving an access token from OAuth2 identity provider
+ type: string
+ username:
+ description: Username in case you're using the Resource Owner Password flow
+ type: string
+ password:
+ description: User password in case you're suing the Resource Owner password
+ flow
+ type: string
+ refreshToken:
+ description: Refresh token in case you're using the Refresh Token rotation
+ flow
+ type: string
+ OAuth2GrantType:
+ description: Enumeration for the different supported grants/flows of OAuth2
+ enum:
+ - PASSWORD
+ - CLIENT_CREDENTIALS
+ - REFRESH_TOKEN
+ type: string
+ responses:
+ ServiceResponse:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/Service'
+ - $ref: '#/components/schemas/ServiceView'
+ description: ""
+ securitySchemes:
+ jwt-bearer:
+ flows:
+ clientCredentials:
+ tokenUrl: https://keycloak.example.com/realms/microcks/protocol/openid-connect/token
+ refreshUrl: https://keycloak.example.com/realms/microcks/protocol/openid-connect/token
+ scopes:
+ user: Simple authenticated user
+ manager: Services & APIs content manager
+ admin: Administrator of the Microcks instance
+ type: oauth2
+ description: JWT Bearer acquired using OAuth 2 Authentication flow or Direct
+ Access Grant
+security:
+- jwt-bearer: []
+tags:
+- name: mock
+ description: Operations related to API and Services mocks
+- name: test
+ description: Operations related to API and Services tests
+- name: job
+ description: Operations related to Jobs for discovering mocks and tests
+- name: config
+ description: Operations related to configuration
+- name: metrics
+ description: Operations related to metrics
diff --git a/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.9.yaml b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.9.yaml
new file mode 100644
index 000000000..3aae0455d
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/api/microcks-openapi-v1.9.yaml
@@ -0,0 +1,2207 @@
+---
+openapi: 3.0.2
+info:
+ title: Microcks API v1.9
+ version: 1.9.0
+ description: "API offered by Microcks, the Kubernetes native tool for API and microservices\
+ \ mocking and testing (microcks.io)"
+ contact:
+ name: Laurent Broudoux
+ url: https://github.com/microcks
+ email: laurent@microcks.io
+ license:
+ name: Apache 2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0
+ x-logo:
+ backgroundColor: '#ffffff'
+ url: https://microcks.io/images/microcks-logo-blue.png
+servers:
+- url: http://microcks.example.com/api
+ description: ""
+paths:
+ /services:
+ summary: This path operations deal with Services
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: page
+ description: Page of Services to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of Services to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServices
+ summary: Get Services and APIs
+ /tests:
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestRequest'
+ required: true
+ tags:
+ - test
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Created TestResult (empty shell cause tests are executed asynchronously)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateTest
+ summary: Create a new Test
+ /services/count:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Services in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServicesCounter
+ summary: Get the Services counter
+ /jobs:
+ summary: This path operations deal with ImportJobs
+ get:
+ tags:
+ - job
+ parameters:
+ - name: page
+ description: Page of ImportJobs to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ - name: size
+ description: Size of a page. Maximum number of ImportJobs to include in a
+ response (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ - name: name
+ description: Name like criterion for query
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/ImportJob'
+ description: List of found ImportJobs
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobs
+ summary: Get ImportJobs
+ description: Retrieve a list of ImportJobs
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Created ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ operationId: CreateImportJob
+ summary: Create ImportJob
+ description: Create a new ImportJob
+ /jobs/{id}:
+ summary: This path or subpaths operations deal with specific ImportJob having
+ given id
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Found ImportJob
+ security:
+ - jwt-bearer:
+ - user
+ summary: Get ImportJob
+ description: Retrieve an ImportJob using its identifier
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ required: true
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Updated ImportJob
+ summary: Update ImportJob
+ description: Update an ImportJob
+ delete:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: ImportJob deleted
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: DeleteImportJob
+ summary: Delete ImportJob
+ description: Delete an ImportJob
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: messages
+ description: Whether to include details on services messages into result.
+ Default is false
+ schema:
+ type: boolean
+ in: query
+ responses:
+ "200":
+ $ref: '#/components/responses/ServiceResponse'
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetService
+ summary: Get Service
+ delete:
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: DeleteService
+ summary: Delete Service
+ description: Delete a Service
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /artifact/upload:
+ summary: Deals with artifacts to be imported by Microcks.
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/ArtifactUpload'
+ examples:
+ Artifact upload:
+ value: |
+ POST /api/artifact/upload HTTP/1.1
+ Host: microcks
+ User-Agent: curl/7.54.0
+ Accept: */*
+ Authorization: Bearer
+ Content-Length: 2743
+ Expect: 100-continue
+ Content-Type: multipart/form-data; boundary=------------------------8af8cbb56dd4bde0
+
+ --------------------------8af8cbb56dd4bde0
+ Content-Disposition: form-data; name="file"; filename="github.json"
+ Content-Type: application/octet-stream
+
+ THE ARTIFACT HERE
+
+ --------------------------8af8cbb56dd4bde0--
+ required: true
+ tags:
+ - job
+ parameters:
+ - name: mainArtifact
+ description: Flag telling if this should be considered as primary or secondary
+ artifact. Default to 'true'
+ schema:
+ type: boolean
+ in: query
+ required: true
+ responses:
+ "201":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact was imported and Service found
+ "204":
+ description: No file attribute found in uploaded data
+ "400":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Artifact content is invalid and not understood
+ security:
+ - jwt-bearer:
+ - user
+ operationId: uploadArtifact
+ summary: Upload an artifact
+ description: Uploads an artifact to be imported by Microcks.
+ /jobs/count:
+ summary: Count ImportJobs
+ get:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of ImportJobs in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetImportJobCounter
+ summary: Get the ImportJobs counter
+ /secrets:
+ summary: This path operations deal with Secrets
+ get:
+ tags:
+ - config
+ parameters:
+ - name: page
+ description: Page of Secrets to retrieve (starts at and defaults to 0)
+ schema:
+ type: integer
+ in: query
+ required: false
+ - name: size
+ description: Size of a page. Maximum number of Secrets to include in a response
+ (defaults to 20)
+ schema:
+ type: integer
+ in: query
+ required: false
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Secret'
+ description: List of found Secrets
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecrets
+ summary: Get Secrets
+ post:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ tags:
+ - config
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Created Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: CreateSecret
+ summary: Create a new Secret
+ /secrets/{id}:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Secret'
+ description: Found Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: GetSecret
+ summary: Get Secret
+ description: Retrieve a Secret
+ put:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Updated Secret
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: UpdateSecret
+ summary: Update Secret
+ description: Update a Secret
+ delete:
+ tags:
+ - config
+ responses:
+ "200":
+ description: Secret has been deleted
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: DeleteSecret
+ summary: Delete Secret
+ description: Delete a Secret
+ parameters:
+ - name: id
+ description: Unique identifier of Secret to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /secrets/count:
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of Secrets in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetSecretsCounter
+ summary: Get the Secrets counter
+ /tests/service/{serviceId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResult'
+ description: List of TestResults for the Service having the requested id
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByService
+ summary: Get TestResults by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/service/{serviceId}/count:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Counter'
+ description: Number of TestResults for this Service in datastore
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResultsByServiceCounter
+ summary: Get the TestResults for Service counter
+ parameters:
+ - name: serviceId
+ description: Unique identifier of Service to manage TestResults for
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestResult'
+ description: Requested TestResult
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetTestResult
+ summary: Get TestResult
+ description: ""
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/messages/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RequestResponsePair'
+ description: List of request and response messages for this TestCase
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetMessagesByTestCase
+ summary: Get messages for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /tests/{id}/testCaseResult:
+ post:
+ requestBody:
+ description: TestCase return wrapper object
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseReturnDTO'
+ required: true
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestCaseResult'
+ description: TestCaseResult is reported
+ operationId: ReportTestCaseResult
+ summary: Report and create a new TestCaseResult
+ description: Report a TestCaseResult (typically used by a Test runner)
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /keycloak/config:
+ summary: Keycloak Authentification configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/KeycloakConfig'
+ description: Get current configuration
+ operationId: GetKeycloakConfig
+ summary: Get authentification configuration
+ /services/{id}/operation:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OperationOverrideDTO'
+ required: true
+ tags:
+ - mock
+ parameters:
+ - name: operationName
+ description: Name of operation to update
+ schema:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ description: Operation has been updated
+ "500":
+ description: Operation cannot be updated
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: OverrideServiceOperation
+ summary: Override Service Operation
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/{id}/metadata:
+ put:
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Metadata'
+ required: true
+ tags:
+ - mock
+ responses:
+ "200":
+ description: Service metadata has been updated
+ "500":
+ description: Update of metadata failed
+ security:
+ - jwt-bearer:
+ - admin
+ - manager
+ operationId: UpdateServiceMetadata
+ summary: Update Service Metadata
+ parameters:
+ - name: id
+ description: Unique identifier of Service to managed
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/search:
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: queryMap
+ description: Map of criterion. Key can be simply 'name' with value as the
+ searched string. You can also search by label using keys like 'labels.x'
+ where 'x' is the label and value the label value
+ schema:
+ type: object
+ additionalProperties:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Service'
+ description: List of found Services (filtered according search criteria)
+ security:
+ - jwt-bearer:
+ - user
+ operationId: SearchServices
+ summary: Search for Services and APIs
+ /tests/{id}/events/{testCaseId}:
+ get:
+ tags:
+ - test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/UnidirectionalEvent'
+ description: List of event messages for this TestCase
+ operationId: GetEventsByTestCase
+ summary: Get events for TestCase
+ parameters:
+ - name: id
+ description: Unique identifier of TestResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: testCaseId
+ description: Unique identifier of TetsCaseResult to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/{name}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Resource'
+ description: Retrieve the resource having this name
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResource
+ summary: Get Resource
+ parameters:
+ - name: name
+ description: Unique name/business identifier of the Service or API resource
+ schema:
+ type: string
+ in: path
+ required: true
+ /resources/service/{serviceId}:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/Resource'
+ description: List the resources attached to a Service or API
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetResourcesByService
+ summary: Get Resources by Service
+ parameters:
+ - name: serviceId
+ description: Unique identifier of the Service or API the resources are attached
+ to
+ schema:
+ type: string
+ in: path
+ required: true
+ /features/config:
+ summary: Optional features configuration
+ get:
+ tags:
+ - config
+ responses:
+ "200":
+ content:
+ application/json: {}
+ description: Get features configuration
+ operationId: GetFeaturesConfiguration
+ summary: Get features configuration
+ /import:
+ summary: Deals with repository snapshot to import in Microcks
+ post:
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/SnapshotUpload'
+ required: true
+ tags:
+ - mock
+ responses:
+ "201":
+ description: Snasphot has been correctly imported
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: importSnapshot
+ summary: Import a snapshot
+ description: Import a repository snapshot previsouly exported into Microcks
+ /export:
+ summary: Deals with repository snapshot to import from Microcks
+ get:
+ tags:
+ - mock
+ parameters:
+ - name: serviceIds
+ description: List of service identifiers to export
+ schema:
+ type: array
+ items:
+ type: string
+ in: query
+ required: true
+ responses:
+ "200":
+ headers:
+ Content-Disposition:
+ schema:
+ type: string
+ examples:
+ filename:
+ value: attachment; filename=microcks-repository.json
+ content:
+ application/json:
+ schema:
+ format: binary
+ type: string
+ description: Snapshot file representing the export of requested services
+ security:
+ - jwt-bearer:
+ - admin
+ operationId: exportSnapshot
+ summary: Export a snapshot
+ description: Export a repostiory snapshot with requested services
+ /metrics/invocations/global:
+ summary: Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Aggregated invocation statistics for specified day
+ operationId: GetAggregatedInvocationsStats
+ summary: Get aggregated invocation statistics for a day
+ /metrics/conformance/aggregate:
+ summary: Aggregation of Test conformance metrics
+ get:
+ tags:
+ - metrics
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/WeightedMetricValue'
+ description: Get aggregated coverage metric value
+ operationId: GetConformanceMetricsAggregation
+ summary: Get aggregation of conformance metrics
+ /metrics/conformance/service/{serviceId}:
+ summary: Test Conformance metrics on API and Services
+ get:
+ tags:
+ - metrics
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestConformanceMetric'
+ description: Test coverage metric for Service
+ operationId: GetServiceTestConformanceMetric
+ summary: Get conformance metrics for a Service
+ parameters:
+ - name: serviceId
+ description: Unique Services identifier this metrics are related to
+ schema:
+ type: string
+ in: path
+ required: true
+ /metrics/invocations/top:
+ summary: Top Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ - name: limit
+ description: The number of top invoked mocks to return
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Top invocations for a defined day
+ operationId: GetTopIvnocationsStatsByDay
+ summary: Get top invocation statistics for a day
+ /metrics/invocations/{serviceName}/{serviceVersion}:
+ summary: Invocation Statistics for API and Services
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: day
+ description: The day to get statistics for (formatted with yyyyMMdd pattern).
+ Default to today if not provided.
+ schema:
+ type: string
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DailyInvocationStatistic'
+ description: Invocation statistics for service for specified day
+ operationId: GetInvocationStatsByService
+ summary: Get invocation statistics for Service
+ parameters:
+ - name: serviceName
+ description: Name of service to get statistics for
+ schema:
+ type: string
+ in: path
+ required: true
+ - name: serviceVersion
+ description: Version of service to get statistics for
+ schema:
+ type: string
+ in: path
+ required: true
+ /metrics/invocations/global/latest:
+ summary: Latest Invocation Statistics across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: limit
+ description: Number of days to get back in time. Default is 20.
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CounterMap'
+ description: A map where keys are day (formatted using yyyyMMdd pattern)
+ and values are counter of invocations on this day
+ operationId: GetLatestAggregatedInvocationsStats
+ summary: Get aggregated invocations statistics for latest days
+ /metrics/tests/latest:
+ summary: Lastest Test results across Services and APIs
+ get:
+ tags:
+ - metrics
+ parameters:
+ - name: limit
+ description: Number of days to consider for test results to return. Default
+ is 7 (one week)
+ schema:
+ type: integer
+ in: query
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TestResultSummary'
+ description: Test results summary for specified last days.
+ operationId: GetLatestTestResults
+ summary: Get latest tests results
+ /jobs/{id}/start:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Started ImportJob
+ security:
+ - jwt-bearer:
+ - manager
+ - admin
+ operationId: StartImportJob
+ summary: Start an ImportJob
+ description: Starting an ImportJob forces it to immediatly import mock definitions
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/stop:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: Stopped ImportJob
+ security:
+ - jwt-bearer:
+ - manager
+ - admin
+ operationId: StopImportJob
+ summary: Stop an ImportJob
+ description: "Stopping an ImportJob desactivate it, so that it won't execute\
+ \ at next schedule"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /jobs/{id}/activate:
+ put:
+ tags:
+ - job
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportJob'
+ description: ImportJob is activated
+ security:
+ - jwt-bearer:
+ - manager
+ - admin
+ operationId: ActivateImportJob
+ summary: Activate an ImportJob
+ description: "Make an ImportJob active, so that it is executed"
+ parameters:
+ - name: id
+ description: Unique identifier of ImportJob to manage
+ schema:
+ type: string
+ in: path
+ required: true
+ /services/labels:
+ get:
+ tags:
+ - mock
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LabelsMap'
+ description: "Already used labels: keys are label Keys, values are array\
+ \ of label Values"
+ security:
+ - jwt-bearer:
+ - user
+ operationId: GetServicesLabels
+ summary: Get the already used labels for Services
+components:
+ schemas:
+ TestCaseResult:
+ description: Companion objects for TestResult. Each TestCaseResult correspond
+ to a particuliar service operation / action reference by the operationName
+ field. TestCaseResults owns a collection of TestStepResults (one for every
+ request associated to service operation / action).
+ required:
+ - success
+ - elapsedTime
+ - operationName
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test case beginning
+ type: number
+ operationName:
+ description: Name of operation this test case is bound to
+ type: string
+ testStepResults:
+ description: Test steps associated to this test case
+ type: array
+ items:
+ $ref: '#/components/schemas/TestStepResult'
+ ServiceRef:
+ description: Lightweight reference of an existing Service
+ required:
+ - serviceId
+ - name
+ - version
+ properties:
+ serviceId:
+ description: Unique reference of a Service
+ type: string
+ name:
+ description: The Service name
+ type: string
+ version:
+ description: The Service version
+ type: string
+ SecretRef:
+ description: Lightweight reference for an existing Secret
+ required:
+ - secretId
+ - name
+ properties:
+ secretId:
+ description: Unique identifier or referenced Secret
+ type: string
+ name:
+ description: Distinct name of the referenced Secret
+ type: string
+ example: |-
+ {
+ "secretId": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal"
+ }
+ Secret:
+ description: A Secret allows grouping informations on how to access a restricted
+ resource such as a repsoitory URL. Secrets are typically used by ImpoortJobs.
+ required:
+ - name
+ - description
+ properties:
+ id:
+ description: Unique identifier of Secret
+ type: string
+ name:
+ description: Unique distinct name of Secret
+ type: string
+ username:
+ type: string
+ password:
+ type: string
+ token:
+ type: string
+ tokenHeader:
+ type: string
+ caCertPem:
+ type: string
+ description:
+ description: Description of this Secret
+ type: string
+ example: |-
+ {
+ "id": "5be58fb51ed744d1b87481bd",
+ "name": "Gogs internal",
+ "description": "Gogs internal corporate repository",
+ "username": "team",
+ "password": "team",
+ "caCertPem": "-----BEGIN CERTIFICATE-----\nMIIC6jCCAdKgAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtvcGVu\nc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIwHhcNMTgwNzE4MTA0ODIyWhcNMjMwNzE3\nMTA0ODIzWjAmMSQwIgYDVQQDDBtvcGVuc2hpZnQtc2lnbmVyQDE1MzE5MTA5MDIw\nggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCyaP1jlpnm8WpfCSnUa8Qt\nhdUynOLLgElUtpWoW25wB9tO2ZmEj+fVsTyzEsW8+nfXXfRsBEzPm2ze9uEMTPTB\nAY0k7DbLZfjmF1lCckUvvh1rR/8hoPuXETjXUuOdtm7gRHTOxLQyH2Qi/q0DYJAn\nprKyRCLa35pRnykL6v4bHkqFnqDEho63i29XHhm2703moh4YCl1iYa2Rh6D44cjn\n8lBCq6o7zoZSmc/aBamRkQrfZYcolR8OUtDS4oEB0zMftmea2ycashsLEMB+Cq4r\n64NI2QM7qOxdTuXsDivHfLl7RTuWEOozGaJXoiPaGU/3d/KnY0gKJ2TC1KXt6Xjn\nAgMBAAGjIzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqG\nSIb3DQEBCwUAA4IBAQCeUmxfUzw0VAFG6HvVYIsfvumiIvsSWmclGIZqNJyfMHFD\nMy6xzPRNNfWe5aumGTJsuIzuXfDRcdO7KmH1d2/5brkvWpxp6svVrYPvcoXjl4VN\nQR2mv5Di4KHfiiwvP3eeewjUZj+uREGqX2fcbJPHTPy32Kpb0H8Uy09BklhjC7QP\ngRAGexPhU1oBL/CoOwbHKcQ6dxs/y1SxzI8gXEtec4z62CroI13iT7U0UjSqFBE4\nKfrJombfz0d68781Z40ll+8my251ZNfbLBhQ3UHW0JnkBEQkE1aBorUoj2iakYvx\nA2qZh+8q2b8MwMb2YsQ0dlxKd6c4tN3lmMnO4bnd\n-----END CERTIFICATE-----"
+ }
+ TestCaseReturnDTO:
+ required:
+ - operationName
+ properties:
+ operationName:
+ description: Name of related operation for this TestCase
+ type: string
+ TestReturn:
+ description: TestReturn is used for wrapping the return code of a test step
+ execution
+ required:
+ - code
+ - elapsedTime
+ properties:
+ code:
+ description: "Return code for test (0 means Success, 1 means Failure)"
+ type: integer
+ elapsedTime:
+ format: int64
+ description: Elapsed time in milliseconds
+ type: integer
+ message:
+ description: Error message if any
+ type: string
+ request:
+ $ref: '#/components/schemas/Request'
+ description: Request sent for this test
+ response:
+ $ref: '#/components/schemas/Response'
+ description: Response returned for this test
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Event Message received for this test
+ Request:
+ description: A mock invocation or test request
+ required:
+ - name
+ - operationId
+ properties:
+ id:
+ description: Unique identifier of Request
+ type: string
+ name:
+ description: Unique distinct name of this Request
+ type: string
+ content:
+ description: Body content for this request
+ type: string
+ operationId:
+ description: Identifier of Operation this Request is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Request is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Request
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Response:
+ description: A mock invocation or test response
+ required:
+ - operationId
+ - name
+ properties:
+ operationId:
+ description: Identifier of Operation this Response is associated to
+ type: string
+ content:
+ description: Body content of this Response
+ type: string
+ id:
+ description: Unique identifier of Response
+ type: string
+ name:
+ description: Unique distinct name of this Response
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this Response is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this Response
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ Header:
+ description: Transport headers for both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this Header
+ type: array
+ items:
+ type: string
+ TestStepResult:
+ description: TestStepResult is an entity embedded within TestCaseResult. They
+ are created for each request associated with an operation / action of a microservice.
+ required:
+ - success
+ - elapsedTome
+ properties:
+ success:
+ description: Flag telling if test case is a success
+ type: boolean
+ elapsedTime:
+ description: Elapsed time in milliseconds since the test step beginning
+ type: number
+ requestName:
+ description: Name of request this test step is bound to
+ type: string
+ message:
+ description: Error message that may be associated to this test step
+ type: string
+ eventMessageName:
+ description: Name of event this test step is bound to
+ type: string
+ KeycloakConfig:
+ description: Representation of Keycloak / SSO configuration used by Microcks
+ server
+ required:
+ - realm
+ - auth-server-url
+ - public-client
+ - ssl-required
+ - resource
+ - enabled
+ type: object
+ properties:
+ realm:
+ description: Authentication realm name
+ type: string
+ auth-server-url:
+ description: SSO Server authentication url
+ type: string
+ public-client:
+ description: Name of public-client that can be used for requesting OAuth
+ token
+ type: boolean
+ ssl-required:
+ description: SSL certificates requirements
+ enum:
+ - none
+ - external
+ resource:
+ description: Name of Keycloak resource/application used on client side
+ type: string
+ enabled:
+ description: Whether Keycloak authentification and usage is enabled
+ type: boolean
+ RequestResponsePair:
+ description: Request associated with corresponding Response
+ type: object
+ allOf:
+ - required:
+ - request
+ - response
+ type: object
+ properties:
+ request:
+ $ref: '#/components/schemas/Request'
+ description: The request part of the pair
+ response:
+ $ref: '#/components/schemas/Response'
+ description: The Response part of the pair
+ - $ref: '#/components/schemas/AbstractExchange'
+ OperationOverrideDTO:
+ description: Data Transfer object for grouping the mutable properties of an
+ Operation
+ type: object
+ properties:
+ dispatcher:
+ description: Type of dispatcher to apply for this operation
+ type: string
+ dispatcherRules:
+ description: Rules of dispatcher for this operation
+ type: string
+ defaultDelay:
+ description: Default delay in milliseconds to apply to mock responses on
+ this operation
+ type: integer
+ parameterConstraints:
+ description: Constraints that may apply to incoming parameters on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ ParameterConstraint:
+ description: Companion object for Operation that may be used to express constraints
+ on request parameters
+ required:
+ - name
+ type: object
+ properties:
+ name:
+ description: Parameter name
+ type: string
+ required:
+ description: Whether it's a required constraint
+ type: boolean
+ recopy:
+ description: Whether it's a recopy constraint
+ type: boolean
+ mustMatchRegexp:
+ description: Whether it's a regular expression matching constraint
+ type: string
+ in:
+ description: Parameter location
+ enum:
+ - path
+ - query
+ - header
+ type: string
+ Metadata:
+ description: Commodity object for holding metadata on any entity. This object
+ is inspired by Kubernetes metadata.
+ required:
+ - createdOn
+ - lastUpdate
+ type: object
+ properties:
+ createdOn:
+ description: Creation date of attached object
+ type: number
+ readOnly: true
+ lastUpdate:
+ description: Last update of attached object
+ type: number
+ readOnly: true
+ annotations:
+ description: Annotations of attached object
+ type: object
+ additionalProperties:
+ type: string
+ labels:
+ description: Labels put on attached object
+ type: object
+ additionalProperties:
+ type: string
+ LabelsMap:
+ description: A map which keys are already used labels keys and values are already
+ used values for this key
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/StringArray'
+ type: object
+ UnidirectionalEvent:
+ description: Representation of an unidirectional exchange as an event message
+ type: object
+ allOf:
+ - required:
+ - eventMessage
+ type: object
+ properties:
+ eventMessage:
+ $ref: '#/components/schemas/EventMessage'
+ description: Asynchronous message for this unidirectional event
+ - $ref: '#/components/schemas/AbstractExchange'
+ EventMessage:
+ description: ""
+ required:
+ - id
+ - mediaType
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this message
+ type: string
+ mediaType:
+ description: Content type of message
+ type: string
+ name:
+ description: Unique distinct name of this message
+ type: string
+ content:
+ description: Body content for this message
+ type: string
+ operationId:
+ description: Identifier of Operation this message is associated to
+ type: string
+ testCaseId:
+ description: Unique identifier of TestCase this message is attached (in
+ case of a test)
+ type: string
+ headers:
+ description: Headers for this message
+ type: array
+ items:
+ $ref: '#/components/schemas/Header'
+ StringArray:
+ description: A simple array of String
+ type: array
+ items:
+ type: string
+ MessageArray:
+ description: Array of Message for Service operations
+ type: array
+ items:
+ $ref: '#/components/schemas/Exchange'
+ Exchange:
+ oneOf:
+ - $ref: '#/components/schemas/RequestResponsePair'
+ - $ref: '#/components/schemas/UnidirectionalEvent'
+ discriminator:
+ propertyName: type
+ mapping:
+ reqRespPair: '#/components/schemas/RequestResponsePair'
+ unidirEvent: '#/components/schemas/UnidirectionalEvent'
+ description: "Abstract representation of a Service or API exchange type (request/response,\
+ \ event based, ...)"
+ AbstractExchange:
+ description: Abstract bean representing a Service or API Exchange.
+ required:
+ - type
+ type: object
+ properties:
+ type:
+ description: Discriminant type for identifying kind of exchange
+ enum:
+ - reqRespPair
+ - unidirEvent
+ type: string
+ ServiceView:
+ description: Aggregate bean for grouping a Service an its messages pairs
+ required:
+ - service
+ - messagesMap
+ type: object
+ properties:
+ service:
+ $ref: '#/components/schemas/Service'
+ description: Wrapped service description
+ messagesMap:
+ description: "Map of messages for this Service. Keys are operation name,\
+ \ values are array of messages for this operation"
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MessageArray'
+ TestRequest:
+ description: Test request is a minimalist wrapper for requesting the launch
+ of a new test
+ required:
+ - serviceId
+ - testEndpoint
+ - runnerType
+ - timeout
+ properties:
+ serviceId:
+ description: Unique identifier of service to test
+ type: string
+ testEndpoint:
+ description: Endpoint to test for this service
+ type: string
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ filteredOperations:
+ description: A restriction on service operations to test
+ type: array
+ items:
+ type: string
+ secretName:
+ description: The name of Secret to use for connecting the test endpoint
+ type: string
+ oAuth2Context:
+ $ref: '#/components/schemas/OAuth2ClientContent'
+ description: An OAuth2 context to use for retrieving an access token prior
+ invoking the tested endpoint
+ operationsHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ Resource:
+ description: "Resource represents a Service or API artifacts such as specification,\
+ \ contract"
+ required:
+ - id
+ - name
+ - content
+ - type
+ - serviceId
+ type: object
+ properties:
+ id:
+ description: Uniquer identifier of this Service or API Resource
+ type: string
+ name:
+ description: Unique name/business identifier for this Service or API resource
+ type: string
+ content:
+ description: String content of this resource
+ type: string
+ type:
+ $ref: '#/components/schemas/ResourceType'
+ description: Type of this Service or API resource
+ serviceId:
+ description: Unique identifier of the Servoce or API this resource is attached
+ to
+ type: string
+ path:
+ description: Relative path of this resource regarding main resource
+ type: string
+ sourceArtifact:
+ description: Short name of the artifact this resource was extracted from
+ type: string
+ ImportJob:
+ description: An ImportJob allow defining a repository artifact to poll for discovering
+ Services and APIs mocks and tests
+ required:
+ - name
+ - repositoryUrl
+ properties:
+ id:
+ description: Unique identifier of ImportJob
+ type: string
+ name:
+ description: Unique distinct name of this ImportJob
+ type: string
+ repositoryUrl:
+ description: URL of mocks and tests repository artifact
+ type: string
+ repositoryDisableSSLValidation:
+ description: Whether to disable SSL certificate verification when checking
+ repository
+ type: boolean
+ frequency:
+ description: Reserved for future usage
+ type: string
+ createdDate:
+ format: date-time
+ description: Creation date for this ImportJob
+ type: string
+ lastImportDate:
+ format: date-time
+ description: Date last import was done
+ type: string
+ lastImportError:
+ description: Error message of last import (if any)
+ type: string
+ active:
+ description: Whether this ImportJob is active (ie. scheduled for execution)
+ type: boolean
+ etag:
+ description: Etag of repository URL during previous import. Is used for
+ not re-importing if no recent changes
+ type: string
+ serviceRefs:
+ description: References of Services discovered when checking repository
+ type: array
+ items:
+ $ref: '#/components/schemas/ServiceRef'
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of ImportJob
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: Reference of a Secret to used when checking repository
+ mainArtifact:
+ description: Flag telling if considered as primary or secondary artifact.
+ Default to `true`
+ type: boolean
+ TestRunnerType:
+ description: Type of test strategy (different strategies are implemented by
+ different runners)
+ enum:
+ - HTTP
+ - SOAP_HTTP
+ - SOAP_UI
+ - POSTMAN
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SCHEMA
+ - GRPC_PROTOBUF
+ - GRAPHQL_SCHEMA
+ type: string
+ Operation:
+ description: An Operation of a Service or API
+ required:
+ - name
+ - method
+ type: object
+ properties:
+ name:
+ description: Unique name of this Operation within Service scope
+ type: string
+ method:
+ description: Represents transport method
+ type: string
+ inputName:
+ description: Name of input parameters in case of Xml based Service
+ type: string
+ outputName:
+ description: Name of output parameters in case of Xml based Service
+ type: string
+ dispatcher:
+ description: Dispatcher strategy used for mocks
+ type: string
+ dispatcherRules:
+ description: DispatcherRules used for mocks
+ type: string
+ defaultDelay:
+ description: Default response time delay for mocks
+ type: number
+ resourcePaths:
+ description: Paths the mocks endpoints are mapped on
+ type: array
+ items:
+ type: string
+ parameterContraints:
+ description: Contraints that may apply to mock invocatino on this operation
+ type: array
+ items:
+ $ref: '#/components/schemas/ParameterConstraint'
+ bindings:
+ description: Map of protocol binding details for this operation
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Binding'
+ ArtifactUpload:
+ description: |-
+ Artifact to be imported by Microcks.
+ This structure represents a mime-multipart file upload (as specified here: https://swagger.io/docs/specification/describing-request-body/file-upload/)
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The artifact to upload
+ type: string
+ Counter:
+ description: A simple Counter type.
+ type: object
+ properties:
+ counter:
+ format: int32
+ description: Number of items in a resource collection
+ type: integer
+ example: |-
+ {
+ "counter": 12
+ }
+ FeaturesConfig:
+ title: Root Type for FeaturesConfig
+ description: Representation of optional features configuration used by Microcks
+ server
+ type: object
+ properties:
+ repository-filter:
+ description: Repository filtering feature properties
+ type: object
+ properties:
+ label-label:
+ type: string
+ enabled:
+ type: string
+ label-list:
+ type: string
+ label-key:
+ type: string
+ microcks-hub:
+ description: Microcks Hub feature properties
+ type: object
+ properties:
+ allowed-roles:
+ type: string
+ endpoint:
+ type: string
+ enabled:
+ type: string
+ repository-tenancy:
+ description: Repository tenancy feature properties
+ type: object
+ properties:
+ enabled:
+ type: string
+ artifact-import-allowed-roles:
+ type: string
+ async-api:
+ description: Asynchronous feature properties
+ type: object
+ properties:
+ default-binding:
+ type: string
+ endpoint-MQTT:
+ type: string
+ endpoint-WS:
+ type: string
+ endpoint-KAFKA:
+ type: string
+ endpoint-AMQP:
+ type: string
+ endpoint-NATS:
+ type: string
+ endpoint-GOOGLEPUBSUB:
+ type: string
+ enabled:
+ type: string
+ frequencies:
+ type: string
+ additionalProperties: true
+ example:
+ repository-filter:
+ label-label: Domain
+ enabled: "true"
+ label-list: "domain,status"
+ label-key: domain
+ microcks-hub:
+ allowed-roles: "admin,manager,manager-any"
+ endpoint: https://hub.microcks.io/api
+ enabled: "true"
+ repository-tenancy:
+ enabled: "false"
+ artifact-import-allowed-roles: "admin,manager,manager-any"
+ async-api:
+ default-binding: KAFKA
+ endpoint-MQTT: my-mqtt-broker.apps.try.microcks.io
+ endpoint-WS: localhost:8081
+ endpoint-KAFKA: my-cluster-kafka-bootstrap.apps.try.microcks.io
+ enabled: "false"
+ frequencies: "3,10,30"
+ SnapshotUpload:
+ description: Upload of a repository snapshot file
+ required:
+ - file
+ type: object
+ properties:
+ file:
+ format: binary
+ description: The repository snapshot file
+ type: string
+ HeaderDTO:
+ description: Data Transfert Object for headers of both Requests and Responses
+ required:
+ - name
+ - values
+ type: object
+ properties:
+ name:
+ description: Unique distinct name of this Header
+ type: string
+ values:
+ description: Values for this header (comma separated strings)
+ type: string
+ OperationHeaders:
+ description: "Specification of additional headers for a Service/API operations.\
+ \ Keys are operation name or \"globals\" (if header applies to all), values\
+ \ are Header objects DTO."
+ type: object
+ additionalProperties:
+ type: array
+ items:
+ $ref: '#/components/schemas/HeaderDTO'
+ Service:
+ description: Represents a Service or API definition as registred into Microcks
+ repository
+ required:
+ - name
+ - version
+ - type
+ - sourceArtifact
+ properties:
+ id:
+ description: Unique identifier for this Service or API
+ type: string
+ name:
+ description: Distinct name for this Service or API (maybe shared among many
+ versions)
+ type: string
+ version:
+ description: Distinct version for a named Service or API
+ type: string
+ type:
+ description: Service or API Type
+ enum:
+ - REST
+ - SOAP_HTTP
+ - GENERIC_REST
+ - GENERIC_EVENT
+ - EVENT
+ - GRPC
+ - GRAPHQL
+ type: string
+ operations:
+ description: Set of Operations for Service or API
+ type: array
+ items:
+ $ref: '#/components/schemas/Operation'
+ xmlNS:
+ description: Associated Xml Namespace in case of Xml based Service
+ type: string
+ metadata:
+ $ref: '#/components/schemas/Metadata'
+ description: Metadata of Service
+ sourceArtifact:
+ description: Short name of the main/primary artifact this service was created
+ from
+ type: string
+ Trend:
+ description: Evolution trend qualifier
+ enum:
+ - DOWN
+ - LOW_DOWN
+ - STABLE
+ - LOW_UP
+ - UP
+ type: string
+ WeightedMetricValue:
+ description: Value of a metric with an associated weight
+ required:
+ - name
+ - weight
+ - value
+ type: object
+ properties:
+ name:
+ description: Metric name or serie name
+ type: string
+ weight:
+ description: Weight of this metric value (typically a percentage)
+ type: integer
+ value:
+ description: The value of this metric
+ type: integer
+ DailyInvocationStatistic:
+ description: The daily statistic of a service mock invocations
+ required:
+ - id
+ - day
+ - serviceName
+ - serviceVersion
+ - dailyCount
+ type: object
+ properties:
+ id:
+ description: Unique identifier of this statistic object
+ type: string
+ day:
+ description: The day (formatted as yyyyMMdd string) represented by this
+ statistic
+ type: string
+ serviceName:
+ description: The name of the service this statistic is related to
+ type: string
+ serviceVersion:
+ description: The version of the service this statistic is related to
+ type: string
+ dailyCount:
+ description: The number of service mock invocations on this day
+ type: number
+ hourlyCount:
+ description: The number of service mock invocations per hour of the day
+ (keys range from 0 to 23)
+ type: object
+ additionalProperties: true
+ minuteCount:
+ description: The number of service mock invocations per minute of the day
+ (keys range from 0 to 1439)
+ type: object
+ additionalProperties: true
+ TestConformanceMetric:
+ description: "Represents the test conformance metrics (current score, history\
+ \ and evolution trend) of a Service"
+ required:
+ - id
+ - serviceId
+ - currentScore
+ - maxPossibleScore
+ type: object
+ properties:
+ id:
+ description: Unique identifier of coverage metric
+ type: string
+ serviceId:
+ description: Unique identifier of the Service this metric is related to
+ type: string
+ aggregationLabelValue:
+ description: Value of the label used for metrics aggregation (if any)
+ type: string
+ maxPossibleScore:
+ format: double
+ description: Maximum conformance score that can be reached (depends on samples
+ expresiveness)
+ type: number
+ currentScore:
+ format: double
+ description: Current test conformance score for the related Service
+ type: number
+ lastUpdateDay:
+ description: The day of latest score update (in yyyyMMdd format)
+ type: string
+ latestTrend:
+ $ref: '#/components/schemas/Trend'
+ description: Evolution trend of currentScore
+ latestScores:
+ description: "History of latest scores (key is date with format yyyyMMdd,\
+ \ value is score as double)"
+ type: object
+ additionalProperties:
+ type: number
+ TestResultSummary:
+ description: 'Represents the summary result of a Service or API test run by
+ Microcks. '
+ required:
+ - id
+ - testDate
+ - serviceId
+ - success
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ testDate:
+ format: int64
+ description: Timestamp of creation date of this service
+ type: integer
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ TestResult:
+ description: "Represents the result of a Service or API test run by Microcks.\
+ \ Tests are related to a service and made of multiple test cases corresponding\
+ \ to each operations / actions composing service. Tests are run against a\
+ \ specific endpoint named testedEndpoint. It holds global markers telling\
+ \ if test still ran, is a success, how many times is has taken and so on ..."
+ required:
+ - id
+ - version
+ - testNumber
+ - testDate
+ - testedEndpoint
+ - serviceId
+ - success
+ - inProgress
+ - runnerType
+ properties:
+ id:
+ description: Unique identifier of TestResult
+ type: string
+ version:
+ description: Revision number of this test
+ type: number
+ testNumber:
+ description: Incremental number for tracking number of tests of a service
+ type: number
+ testDate:
+ format: int64
+ description: Timestamp of creation date of this service
+ type: integer
+ testedEndpoint:
+ description: Endpoint used during test
+ type: string
+ serviceId:
+ description: Unique identifier of service tested
+ type: string
+ elapsedTime:
+ description: Elapsed time in milliseconds since test beginning
+ type: number
+ success:
+ description: Flag telling if test is a success
+ type: boolean
+ inProgress:
+ description: Flag telling is test is still in progress
+ type: boolean
+ runnerType:
+ $ref: '#/components/schemas/TestRunnerType'
+ description: Runner used for this test
+ testCaseResults:
+ description: TestCase results associated to this test
+ type: array
+ items:
+ $ref: '#/components/schemas/TestCaseResult'
+ secretRef:
+ $ref: '#/components/schemas/SecretRef'
+ description: The referrence of the Secret used for connecting to test endpoint
+ operationHeaders:
+ $ref: '#/components/schemas/OperationHeaders'
+ description: This test operations headers override
+ timeout:
+ description: The maximum time (in milliseconds) to wait for this test ends
+ type: integer
+ authorizedClient:
+ $ref: '#/components/schemas/OAuth2AuthorizedClient'
+ description: The OAuth2 authorized client that performed the test
+ Binding:
+ description: Protocol binding details for asynchronous operations
+ required:
+ - type
+ - destinationName
+ type: object
+ properties:
+ type:
+ description: Protocol binding identifier
+ enum:
+ - KAFKA
+ - MQTT
+ - WS
+ - AMQP
+ - NATS
+ - GOOGLEPUBSUB
+ type: string
+ keyType:
+ description: Type of key for Kafka messages
+ type: string
+ destinationType:
+ description: Type of destination for asynchronous messages of this operation
+ type: string
+ destinationName:
+ description: Name of destination for asynchronous messages of this operation
+ type: string
+ qoS:
+ description: Quality of Service attribute for MQTT binding
+ type: string
+ persistent:
+ description: Persistent attribute for MQTT binding
+ type: boolean
+ method:
+ description: HTTP method for WebSocket binding
+ type: string
+ ResourceType:
+ description: Types of managed resources for Services or APIs
+ enum:
+ - WSDL
+ - XSD
+ - JSON_SCHEMA
+ - OPEN_API_SPEC
+ - OPEN_API_SCHEMA
+ - ASYNC_API_SPEC
+ - ASYNC_API_SCHEMA
+ - AVRO_SCHEMA
+ - PROTOBUF_SCHEMA
+ - PROTOBUF_DESCRIPTION
+ - GRAPHQL_SCHEMA
+ - POSTMAN_COLLECTION
+ type: string
+ CounterMap:
+ description: A generic map of counter
+ type: object
+ additionalProperties:
+ type: number
+ OAuth2ClientContent:
+ description: Represents a volatile OAuth2 client context usually associated
+ with a Test request
+ required:
+ - clientId
+ - clientSecret
+ - tokenUri
+ type: object
+ properties:
+ clientId:
+ description: Id for connecting to OAuth2 identity provider
+ type: string
+ clientSecret:
+ format: password
+ description: Secret for connecting to OAuth2 identity provider
+ type: string
+ tokenUri:
+ description: URI for retrieving an access token from OAuth2 identity provider
+ type: string
+ username:
+ description: Username in case you're using the Resource Owner Password flow
+ type: string
+ password:
+ description: User password in case you're suing the Resource Owner password
+ flow
+ type: string
+ refreshToken:
+ description: Refresh token in case you're using the Refresh Token rotation
+ flow
+ type: string
+ OAuth2GrantType:
+ description: Enumeration for the different supported grants/flows of OAuth2
+ enum:
+ - PASSWORD
+ - CLIENT_CREDENTIALS
+ - REFRESH_TOKEN
+ type: string
+ OAuth2AuthorizedClient:
+ description: OAuth2 authorized client that performed a test
+ required:
+ - grantType
+ - principalName
+ - tokenUri
+ type: object
+ properties:
+ grantType:
+ $ref: '#/components/schemas/OAuth2GrantType'
+ description: OAuth2 authorization flow/grant type applied
+ principalName:
+ description: Name of authorized principal (clientId or username in the case
+ of Password grant type)
+ type: string
+ tokenUri:
+ description: Identity Provider URI used for token retrieval
+ type: string
+ scopes:
+ description: Included scopes (separated using space)
+ type: string
+ responses:
+ ServiceResponse:
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/Service'
+ - $ref: '#/components/schemas/ServiceView'
+ description: ""
+ securitySchemes:
+ jwt-bearer:
+ flows:
+ clientCredentials:
+ tokenUrl: https://keycloak.example.com/realms/microcks/protocol/openid-connect/token
+ refreshUrl: https://keycloak.example.com/realms/microcks/protocol/openid-connect/token
+ scopes:
+ user: Simple authenticated user
+ manager: Services & APIs content manager
+ admin: Administrator of the Microcks instance
+ type: oauth2
+ description: JWT Bearer acquired using OAuth 2 Authentication flow or Direct
+ Access Grant
+security:
+- jwt-bearer: []
+tags:
+- name: mock
+ description: Operations related to API and Services mocks
+- name: test
+ description: Operations related to API and Services tests
+- name: job
+ description: Operations related to Jobs for discovering mocks and tests
+- name: config
+ description: Operations related to configuration
+- name: metrics
+ description: Operations related to metrics
diff --git a/jdk_21_maven/cs/rest-gui/microcks/benchmark/README.md b/jdk_21_maven/cs/rest-gui/microcks/benchmark/README.md
new file mode 100644
index 000000000..47fb7e688
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/benchmark/README.md
@@ -0,0 +1,109 @@
+# K6 load testing on Microcks instance
+
+This benchmark tool provides you an easy way of validating/sizing/evaluating changes on your Microcks instance.
+It allows you to simulate Virtual Users on different usage scenarios and gather performance metrics of your instance.
+
+1. Start you Microck instance
+2. Import MicrocksIO Samples APIs / Pastry API - 2.0
+3. Import MicrocksIO Samples APIs / Movie Graph API
+4. Import MicrocksIO Samples APIs / HelloService Mock
+5. Import any other mock if you want to have more APIs to browse
+
+## Settings that may impact your Microcks instance performance
+
+Please carefully consider those settings that may have a direct impact on your Microcks instance:
+
+* Instance sizing - when deployed on Kubernetes, check the `requests.cpu`, `limits.cpu`, `requests.memory` and `requests.memory` settings,
+* Enabling/Disabling invocation statistics - by default, Microcks has a `mocks.enable-invocation-stats` configuration property that is set to `true`.
+This can cause an overhead even if the processing is asynchronous,
+* MongoDB database indexes - Microcks comes with no index by default, but we put some recommendations in [mongodb-indexes](./mongodb-indexes.md),
+* Logging verbosity - moving from `DEBUG` to `INFO` or above levels may have a significant impact.
+
+## Required environment variables
+
+```sh
+export MICROCKS_BASE_URL=http://172.31.243.54:8080
+export K6_VERSION=0.48.0
+export PROMETHEUS_RW_URL=http://172.31.243.54:9080/api/v1/write # Optional
+```
+
+If you're running Microcks locally (via docker-compose or other), you may use these ones:
+
+```sh
+export MICROCKS_BASE_URL=http://host.docker.internal:8080
+export K6_VERSION=0.48.0
+```
+
+## Simple script execution
+
+The command below launches a test script that last between 1 and 2 minutes depending on your instance:
+
+```sh
+docker run --rm -i \
+ -e BASE_URL=${MICROCKS_BASE_URL} \
+ grafana/k6:${K6_VERSION} run \
+ - < bench-microcks.js
+```
+
+Behind the scenes, it executes 4 different scenarios that simulates different activities:
+* `browse` simulates Virtual Users that browse the Microcks API repository,
+* `invokeRESTMocks` simulates VU/apps that invoke a bunch of mock REST endpoint of our **Pastry API - 2.0** sample,
+* `invokeGraphQLMocks` simulates VU/apps that invoke a bunch of mock GraphQL endpoint of our **Movie Graph API** sample,
+* `invokeSOAPMocks` simulates VU/apps that invoke a bunch of mock SOAP endpoint of our **HelloService Mock** sample.
+
+
+## Override wait time & scenarios
+
+The `browse` scenario has a `WAIT_TIME` configuration that simulates pause time between user interaction.
+The default value is `0.5` but you can customize it to suit your needs:
+
+```sh
+docker run --rm -i \
+ -e BASE_URL=${MICROCKS_BASE_URL} \
+ -e WAIT_TIME=0.2 \
+ grafana/k6:${K6_VERSION} run \
+ - < bench-microcks.js
+```
+
+More over you can configure the number of Virtual Users and iteration for each scenario. That way, you can
+use this benchmark to be truly representative to your API patrimony and expected load. Just edit the `bench-microcks.js`
+and check the `scenarios` section:
+
+```json
+[...]
+ scenarios: {
+ browse: {
+ [...]
+ },
+ invokeRESTMocks: {
+ executor: 'per-vu-iterations',
+ exec: 'invokeRESTMocks',
+ vus: 40,
+ iterations: 200,
+ startTime: '5s',
+ maxDuration: '2m',
+ },
+ invokeGraphQLMocks: {
+ [...]
+ },
+ invokeSOAPMocks: {
+ [...]
+ },
+ }
+[...]
+```
+
+## Export metrics to prometheus endpoint
+
+The K6 scripts results may be exported to a running Prometheus instance like this:
+
+```sh
+docker run --rm -i \
+ -e K6_PROMETHEUS_RW_SERVER_URL=${PROMETHEUS_RW_URL} \
+ -e K6_PROMETHEUS_RW_TREND_STATS="p(95),p(99),min,max" \
+ -e BASE_URL=${MICROCKS_BASE_URL} \
+ grafana/k6:${K6_VERSION} run \
+ --tag testid=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
+ -o experimental-prometheus-rw \
+ - < bench-microcks.js
+```
diff --git a/jdk_21_maven/cs/rest-gui/microcks/benchmark/bench-microcks.js b/jdk_21_maven/cs/rest-gui/microcks/benchmark/bench-microcks.js
new file mode 100644
index 000000000..e8816588e
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/benchmark/bench-microcks.js
@@ -0,0 +1,54 @@
+import { browse, invokeRESTMocks, invokeGraphQLMocks, invokeSOAPMocks } from '../testsuite/commons.js';
+
+// Define the options for your test
+export let options = {
+ /*
+ stages: [
+ { duration: '1m', target: 50 }, // Ramp up to 50 virtual users over 1 minute
+ { duration: '3m', target: 50 }, // Stay at 50 virtual users for 3 minutes
+ { duration: '30s', target: 0 } // Ramp down to 0 virtual users over 30 seconds
+ ],
+ */
+ scenarios: {
+ browse: {
+ executor: 'constant-vus',
+ exec: 'browse',
+ vus: 20,
+ duration: '1m',
+ },
+ invokeRESTMocks: {
+ executor: 'per-vu-iterations',
+ exec: 'invokeRESTMocks',
+ vus: 40,
+ iterations: 200,
+ startTime: '5s',
+ maxDuration: '2m',
+ },
+ invokeGraphQLMocks: {
+ executor: 'per-vu-iterations',
+ exec: 'invokeGraphQLMocks',
+ vus: 20,
+ iterations: 100,
+ startTime: '10s',
+ maxDuration: '2m',
+ },
+ invokeSOAPMocks: {
+ executor: 'per-vu-iterations',
+ exec: 'invokeSOAPMocks',
+ vus: 5,
+ iterations: 5,
+ startTime: '15s',
+ maxDuration: '2m',
+ }
+ }
+};
+
+// The default function runs all tests in sequence
+export default function () {
+ invokeRESTMocks();
+ invokeGraphQLMocks();
+ invokeSOAPMocks();
+ browse()
+ sleep(2); // pause between iterations
+}
+export { browse, invokeRESTMocks, invokeGraphQLMocks, invokeSOAPMocks };
diff --git a/jdk_21_maven/cs/rest-gui/microcks/benchmark/mongodb-indexes.md b/jdk_21_maven/cs/rest-gui/microcks/benchmark/mongodb-indexes.md
new file mode 100644
index 000000000..e0fb8b8f2
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/benchmark/mongodb-indexes.md
@@ -0,0 +1,29 @@
+From a certain size of MongoDB, it can be interesting to add some indexes to your database.
+
+Here are below the indexes of interest with the commands on how to create them in your database:
+
+```shell
+db.dailyStatistic.createIndex( {day: -1, serviceName: 1, serviceVersion: -1}, {name: "day-1_serviceName1_serviceVersion-1"} );
+db.eventMessage.createIndex( {operationId: -1}, {name: "operationId-1"} );
+db.eventMessage.createIndex( {testCaseId: -1}, {name: "testCaseId-1"} );
+db.request.createIndex( {operationId: -1}, {name: "operationId-1"} );
+db.request.createIndex( {testCaseId: -1}, {name: "testCaseId-1"} );
+db.response.createIndex( {operationId: -1}, {name: "operationId-1"} );
+db.response.createIndex( {testCaseId: -1}, {name: "testCaseId-1"} );
+db.testResult.createIndex( {serviceId: -1}, {name: "serviceId-1"} );
+db.testConformanceMetric.createIndex( {serviceId: -1}, {name: "serviceId-1"} );
+```
+
+And how to drop them if you find they are not efficient enough:
+
+```shell
+db.dailyStatistic.dropIndex("day-1_serviceName1_serviceVersion-1");
+db.eventMessage.dropIndex("operationId-1");
+db.eventMessage.dropIndex("testCaseId-1");
+db.request.dropIndex("operationId-1");
+db.request.dropIndex("testCaseId-1");
+db.response.dropIndex("operationId-1");
+db.response.dropIndex("testCaseId-1");
+db.testResult.dropIndex("serviceId-1");
+db.testConformanceMetric.dropIndex("serviceId-1");
+```
\ No newline at end of file
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/pom.xml b/jdk_21_maven/cs/rest-gui/microcks/commons/model/pom.xml
new file mode 100644
index 000000000..5a7fac9bd
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/pom.xml
@@ -0,0 +1,79 @@
+
+
+
+
+
+ microcks
+ io.github.microcks
+ 1.12.2-SNAPSHOT
+ ../../pom.xml
+
+ 4.0.0
+
+ Microcks Model
+ microcks-model
+
+
+ UTF-8
+ ../..
+ 21
+ 5.10.2
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-mongodb
+
+
+
+ org.yaml
+ snakeyaml
+
+
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+
+
+
+
+ org.junit.jupiter
+ junit-jupiter
+ ${junit.version}
+ test
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.1
+
+ ${java.version}
+ ${java.version}
+ ${project.build.sourceEncoding}
+ -Xlint:deprecation
+ -Xlint:unchecked
+
+
+
+
+
\ No newline at end of file
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Binding.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Binding.java
new file mode 100644
index 000000000..add16b416
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Binding.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+/**
+ * Binding details for asynchronous operations.
+ * @author laurent
+ */
+public class Binding {
+
+ private BindingType type;
+ private String keyType;
+ private String destinationType;
+ private String destinationName;
+ private String method;
+ private String qoS;
+ private boolean persistent;
+
+ public Binding() {
+ }
+
+ public Binding(BindingType type) {
+ this.type = type;
+ }
+
+ public BindingType getType() {
+ return type;
+ }
+
+ public void setType(BindingType type) {
+ this.type = type;
+ }
+
+ public String getKeyType() {
+ return keyType;
+ }
+
+ public void setKeyType(String keyType) {
+ this.keyType = keyType;
+ }
+
+ public String getDestinationType() {
+ return destinationType;
+ }
+
+ public void setDestinationType(String destinationType) {
+ this.destinationType = destinationType;
+ }
+
+ public String getDestinationName() {
+ return destinationName;
+ }
+
+ public void setDestinationName(String destinationName) {
+ this.destinationName = destinationName;
+ }
+
+ public String getMethod() {
+ return method;
+ }
+
+ public void setMethod(String method) {
+ this.method = method;
+ }
+
+ public String getQoS() {
+ return qoS;
+ }
+
+ public void setQoS(String qoS) {
+ this.qoS = qoS;
+ }
+
+ public boolean isPersistent() {
+ return persistent;
+ }
+
+ public void setPersistent(boolean persistent) {
+ this.persistent = persistent;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/BindingType.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/BindingType.java
new file mode 100644
index 000000000..140ae7627
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/BindingType.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+/**
+ * Enumeration of types for asynchronous protocols bindings.
+ * @author laurent
+ */
+public enum BindingType {
+ KAFKA,
+ MQTT,
+ WS,
+ AMQP,
+ AMQP1,
+ NATS,
+ GOOGLEPUBSUB,
+ SQS,
+ SNS
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/DailyStatistic.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/DailyStatistic.java
new file mode 100644
index 000000000..b115adb77
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/DailyStatistic.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import org.springframework.data.annotation.Id;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Domain objects representing daily invocation stats of mocks served by Microcks.
+ * @author laurent
+ */
+public class DailyStatistic {
+
+ @Id
+ private String id;
+ private String day;
+ private String serviceName;
+ private String serviceVersion;
+ private long dailyCount;
+
+ private Map hourlyCount = new HashMap<>();
+ private Map minuteCount = new HashMap<>();
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getDay() {
+ return day;
+ }
+
+ public void setDay(String day) {
+ this.day = day;
+ }
+
+ public String getServiceName() {
+ return serviceName;
+ }
+
+ public void setServiceName(String serviceName) {
+ this.serviceName = serviceName;
+ }
+
+ public String getServiceVersion() {
+ return serviceVersion;
+ }
+
+ public void setServiceVersion(String serviceVersion) {
+ this.serviceVersion = serviceVersion;
+ }
+
+ public long getDailyCount() {
+ return dailyCount;
+ }
+
+ public void setDailyCount(long dailyCount) {
+ this.dailyCount = dailyCount;
+ }
+
+ public Map getHourlyCount() {
+ return hourlyCount;
+ }
+
+ public void setHourlyCount(Map hourlyCount) {
+ this.hourlyCount = hourlyCount;
+ }
+
+ public Map getMinuteCount() {
+ return minuteCount;
+ }
+
+ public void setMinuteCount(Map minuteCount) {
+ this.minuteCount = minuteCount;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/EventMessage.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/EventMessage.java
new file mode 100644
index 000000000..e60bcbb4b
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/EventMessage.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import org.springframework.data.annotation.Id;
+
+/**
+ * A simple event message published or sent in an asynchronous exchange.
+ * @author laurent
+ */
+public class EventMessage extends Message {
+
+ @Id
+ private String id;
+ private String mediaType;
+ private String dispatchCriteria;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getMediaType() {
+ return mediaType;
+ }
+
+ public void setMediaType(String mediaType) {
+ this.mediaType = mediaType;
+ }
+
+ public String getDispatchCriteria() {
+ return dispatchCriteria;
+ }
+
+ public void setDispatchCriteria(String dispatchCriteria) {
+ this.dispatchCriteria = dispatchCriteria;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Exchange.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Exchange.java
new file mode 100644
index 000000000..34776de8b
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Exchange.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
+@JsonSubTypes({ @JsonSubTypes.Type(value = RequestResponsePair.class, name = "reqRespPair"),
+ @JsonSubTypes.Type(value = UnidirectionalEvent.class, name = "unidirEvent") })
+/**
+ * Abstract bean representing a Service or API Exchange..
+ * @author laurent
+ */
+public abstract class Exchange {
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/GenericResource.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/GenericResource.java
new file mode 100644
index 000000000..0069370e6
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/GenericResource.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.github.microcks.domain;
+
+import org.bson.Document;
+import org.springframework.data.annotation.Id;
+
+/**
+ * Domain class representing a GenericResource created for simple CRUD mocking.
+ * @author laurent
+ */
+public class GenericResource {
+
+ @Id
+ private String id;
+ private String serviceId;
+ private Document payload;
+ private boolean reference = false;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getServiceId() {
+ return serviceId;
+ }
+
+ public void setServiceId(String serviceId) {
+ this.serviceId = serviceId;
+ }
+
+ public Document getPayload() {
+ return payload;
+ }
+
+ public void setPayload(Document payload) {
+ this.payload = payload;
+ }
+
+ public boolean isReference() {
+ return reference;
+ }
+
+ public void setReference(boolean reference) {
+ this.reference = reference;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Header.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Header.java
new file mode 100644
index 000000000..738345724
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Header.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Companion objects for all messages implementations instances. Represent some transport headers for both requests and
+ * responses.
+ * @author laurent
+ */
+public class Header {
+
+ private String name;
+
+ private Set values = new HashSet<>();
+
+ /**
+ * Default empty constructor.
+ */
+ public Header() {
+ }
+
+ /**
+ * Build a new Header with a name and a set of values.
+ * @param name The header name
+ * @param values The set of values for this header
+ */
+ public Header(String name, Set values) {
+ this.name = name;
+ this.values = values;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Set getValues() {
+ return values;
+ }
+
+ public void setValues(Set values) {
+ this.values = values;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ImportJob.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ImportJob.java
new file mode 100644
index 000000000..3c122d3a2
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ImportJob.java
@@ -0,0 +1,167 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import org.springframework.data.annotation.Id;
+
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Domain object representing an import job within Microcks. Import jobs are responsible of periodically checking tests
+ * & mocks repository in order to update their definitions with Microcks own repository. They typically used the
+ * repositoryUrl attribute, associated with the etag marker in order to easily see if something has been updated.
+ * @author laurent
+ */
+public class ImportJob {
+
+ @Id
+ private String id;
+ private String name;
+ private String repositoryUrl;
+ private boolean mainArtifact = true;
+ private boolean repositoryDisableSSLValidation = false;
+ private String frequency;
+ private Date createdDate;
+ private Date lastImportDate;
+ private String lastImportError;
+ private boolean active = false;
+ private String etag;
+
+ private Metadata metadata;
+ private SecretRef secretRef;
+ private Set serviceRefs;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getRepositoryUrl() {
+ return repositoryUrl;
+ }
+
+ public void setRepositoryUrl(String repositoryUrl) {
+ this.repositoryUrl = repositoryUrl;
+ }
+
+ public boolean isMainArtifact() {
+ return mainArtifact;
+ }
+
+ public void setMainArtifact(boolean mainArtifact) {
+ this.mainArtifact = mainArtifact;
+ }
+
+ public boolean isRepositoryDisableSSLValidation() {
+ return repositoryDisableSSLValidation;
+ }
+
+ public void setRepositoryDisableSSLValidation(boolean repositoryDisableSSLValidation) {
+ this.repositoryDisableSSLValidation = repositoryDisableSSLValidation;
+ }
+
+ public String getFrequency() {
+ return frequency;
+ }
+
+ public void setFrequency(String frequency) {
+ this.frequency = frequency;
+ }
+
+ public Date getCreatedDate() {
+ return createdDate;
+ }
+
+ public void setCreatedDate(Date createdDate) {
+ this.createdDate = createdDate;
+ }
+
+ public Date getLastImportDate() {
+ return lastImportDate;
+ }
+
+ public void setLastImportDate(Date lastImportDate) {
+ this.lastImportDate = lastImportDate;
+ }
+
+ public String getLastImportError() {
+ return lastImportError;
+ }
+
+ public void setLastImportError(String lastImportError) {
+ this.lastImportError = lastImportError;
+ }
+
+ public boolean isActive() {
+ return active;
+ }
+
+ public void setActive(boolean active) {
+ this.active = active;
+ }
+
+ public String getEtag() {
+ return etag;
+ }
+
+ public void setEtag(String etag) {
+ this.etag = etag;
+ }
+
+ public Metadata getMetadata() {
+ return metadata;
+ }
+
+ public void setMetadata(Metadata metadata) {
+ this.metadata = metadata;
+ }
+
+ public SecretRef getSecretRef() {
+ return secretRef;
+ }
+
+ public void setSecretRef(SecretRef secretRef) {
+ this.secretRef = secretRef;
+ }
+
+ public Set getServiceRefs() {
+ return serviceRefs;
+ }
+
+ public void setServiceRefs(Set serviceRefs) {
+ this.serviceRefs = serviceRefs;
+ }
+
+ public void addServiceRef(ServiceRef serviceRef) {
+ if (this.serviceRefs == null) {
+ this.serviceRefs = new HashSet<>();
+ }
+ serviceRefs.add(serviceRef);
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Message.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Message.java
new file mode 100644
index 000000000..1837e987c
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Message.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Base class holding common attributes for Request, Response and EventMessage domain objects.
+ * @author laurent
+ */
+public abstract class Message {
+
+ private String name;
+ private String content;
+ private String operationId;
+ private String testCaseId;
+ private String sourceArtifact;
+
+ private Set headers;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getContent() {
+ return content;
+ }
+
+ public void setContent(String content) {
+ this.content = content;
+ }
+
+ public String getOperationId() {
+ return operationId;
+ }
+
+ public void setOperationId(String operationId) {
+ this.operationId = operationId;
+ }
+
+ public String getTestCaseId() {
+ return testCaseId;
+ }
+
+ public void setTestCaseId(String testCaseId) {
+ this.testCaseId = testCaseId;
+ }
+
+ public String getSourceArtifact() {
+ return sourceArtifact;
+ }
+
+ public void setSourceArtifact(String sourceArtifact) {
+ this.sourceArtifact = sourceArtifact;
+ }
+
+ public Set getHeaders() {
+ return headers;
+ }
+
+ public void setHeaders(Set headers) {
+ this.headers = headers;
+ }
+
+ public void addHeader(Header header) {
+ if (this.headers == null) {
+ this.headers = new HashSet<>();
+ }
+ headers.add(header);
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Metadata.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Metadata.java
new file mode 100644
index 000000000..3bb4a006e
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Metadata.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import java.util.*;
+
+/**
+ * This is a commodity object for holding metadata on any entity. This object is inspired by Kubernetes metadata.
+ * @author laurent
+ */
+public class Metadata {
+
+ private Date createdOn = new Date();
+ private Date lastUpdate = new Date();
+ private Map annotations;
+ private Map labels;
+
+ /** Mark the related object of this metadata as updated. */
+ public void objectUpdated() {
+ lastUpdate = new Date();
+ }
+
+ /** @return The creation date of the related object. */
+ public Date getCreatedOn() {
+ return createdOn;
+ }
+
+ /** @return The last update date of the related object. */
+ public Date getLastUpdate() {
+ return lastUpdate;
+ }
+
+ /** @return An immutable version of annotations map. */
+ public Map getAnnotations() {
+ if (annotations == null) {
+ return null;
+ }
+ return Collections.unmodifiableMap(annotations);
+ }
+
+ /**
+ * Add a new annotation or update an existing one within this metadata.
+ * @param key The key of the annotation to add / update
+ * @param value The value of the annotation to add / update.
+ */
+ public void setAnnotation(String key, String value) {
+ if (key != null && value != null) {
+ if (annotations == null) {
+ annotations = new HashMap<>();
+ }
+ annotations.put(key, value);
+ }
+ }
+
+ /**
+ * Override all the metadata annotations with new ones.
+ * @param annotations New annotations to set
+ */
+ public void setAnnotations(Map annotations) {
+ this.annotations = annotations;
+ }
+
+ /** @return An immutable version of labels map. */
+ public Map getLabels() {
+ if (labels == null) {
+ return null;
+ }
+ return Collections.unmodifiableMap(labels);
+ }
+
+ /**
+ * Add a new label or update an existing one within this metadata.
+ * @param key The key of the label to add / update
+ * @param value The value of the label to add / update.
+ */
+ public void setLabel(String key, String value) {
+ if (key != null && value != null) {
+ if (labels == null) {
+ labels = new HashMap<>();
+ }
+ labels.put(key, value);
+ }
+ }
+
+ /**
+ * Override all the metadata labels with new ones.
+ * @param labels New labels to set
+ */
+ public void setLabels(Map labels) {
+ this.labels = labels;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/OAuth2AuthorizedClient.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/OAuth2AuthorizedClient.java
new file mode 100644
index 000000000..321a42a13
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/OAuth2AuthorizedClient.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import org.springframework.data.annotation.Transient;
+
+/**
+ * Represent persisted information for an OAuth2 authorization/authentication done before launching a test.
+ * @author laurent
+ */
+public class OAuth2AuthorizedClient {
+
+ private OAuth2GrantType grantType;
+ private String principalName;
+ private String tokenUri;
+ private String scopes;
+ @Transient
+ private String encodedAccessToken;
+
+ public OAuth2AuthorizedClient() {
+ }
+
+ /**
+ * Build an OAuth2AuthorizedClient from required information including the volatile encodedAccessToken
+ * @param grantType OAuth2 authorization flow/grant type applied.
+ * @param principalName Name of authorized principal
+ * @param tokenUri IDP URI used for token retrieval
+ * @param scopes Included scopes (separated using space)
+ * @param encodedAccessToken THe volatile access token, encoded in base64
+ */
+ public OAuth2AuthorizedClient(OAuth2GrantType grantType, String principalName, String tokenUri, String scopes,
+ String encodedAccessToken) {
+ this.grantType = grantType;
+ this.principalName = principalName;
+ this.tokenUri = tokenUri;
+ this.scopes = scopes;
+ this.encodedAccessToken = encodedAccessToken;
+ }
+
+ public OAuth2GrantType getGrantType() {
+ return grantType;
+ }
+
+ public void setGrantType(OAuth2GrantType grantType) {
+ this.grantType = grantType;
+ }
+
+ public String getPrincipalName() {
+ return principalName;
+ }
+
+ public void setPrincipalName(String principalName) {
+ this.principalName = principalName;
+ }
+
+ public String getTokenUri() {
+ return tokenUri;
+ }
+
+ public void setTokenUri(String tokenUri) {
+ this.tokenUri = tokenUri;
+ }
+
+ public String getScopes() {
+ return scopes;
+ }
+
+ public void setScopes(String scopes) {
+ this.scopes = scopes;
+ }
+
+ public String getEncodedAccessToken() {
+ return encodedAccessToken;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/OAuth2ClientContext.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/OAuth2ClientContext.java
new file mode 100644
index 000000000..6aaa102c4
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/OAuth2ClientContext.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import java.io.Serializable;
+
+/**
+ * Represents a volatile OAuth2 client context usually associated with a Test request.
+ * @author laurent
+ */
+public class OAuth2ClientContext implements Serializable {
+
+ private String clientId;
+ private String clientSecret;
+ private String tokenUri;
+ private String scopes;
+ private String username;
+ private String password;
+ private String refreshToken;
+ private OAuth2GrantType grantType;
+
+ public String getClientId() {
+ return clientId;
+ }
+
+ public void setClientId(String clientId) {
+ this.clientId = clientId;
+ }
+
+ public String getClientSecret() {
+ return clientSecret;
+ }
+
+ public void setClientSecret(String clientSecret) {
+ this.clientSecret = clientSecret;
+ }
+
+ public String getTokenUri() {
+ return tokenUri;
+ }
+
+ public void setTokenUri(String tokenUri) {
+ this.tokenUri = tokenUri;
+ }
+
+ public String getScopes() {
+ return scopes;
+ }
+
+ public void setScopes(String scopes) {
+ this.scopes = scopes;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getRefreshToken() {
+ return refreshToken;
+ }
+
+ public void setRefreshToken(String refreshToken) {
+ this.refreshToken = refreshToken;
+ }
+
+ public OAuth2GrantType getGrantType() {
+ return grantType;
+ }
+
+ public void setGrantType(OAuth2GrantType grantType) {
+ this.grantType = grantType;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/OAuth2GrantType.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/OAuth2GrantType.java
new file mode 100644
index 000000000..7900872f5
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/OAuth2GrantType.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+/**
+ * Enumeration for the different supported grants/flows of OAuth2.
+ * @author laurent
+ */
+public enum OAuth2GrantType {
+ PASSWORD,
+ CLIENT_CREDENTIALS,
+ REFRESH_TOKEN;
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Operation.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Operation.java
new file mode 100644
index 000000000..a4df31da4
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Operation.java
@@ -0,0 +1,163 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * An Operation / action of a micro service. Holds information on messages constitution (inputName, outputName,
+ * bindings) and how dispatch request to them.
+ * @author laurent
+ */
+public class Operation {
+
+ private String name;
+ private String method;
+ private String action;
+ private String inputName;
+ private String outputName;
+ private Map bindings;
+
+ private boolean override = false;
+ private String dispatcher;
+ private String dispatcherRules;
+ private Long defaultDelay;
+
+ private Set resourcePaths;
+ private Set parameterConstraints;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getMethod() {
+ return method;
+ }
+
+ public void setMethod(String method) {
+ this.method = method;
+ }
+
+ public String getAction() {
+ return action;
+ }
+
+ public void setAction(String action) {
+ this.action = action;
+ }
+
+ public String getInputName() {
+ return inputName;
+ }
+
+ public void setInputName(String inputName) {
+ this.inputName = inputName;
+ }
+
+ public String getOutputName() {
+ return outputName;
+ }
+
+ public void setOutputName(String outputName) {
+ this.outputName = outputName;
+ }
+
+ public Map getBindings() {
+ return bindings;
+ }
+
+ public void setBindings(Map bindings) {
+ this.bindings = bindings;
+ }
+
+ public void addBinding(String name, Binding binding) {
+ if (this.bindings == null) {
+ this.bindings = new HashMap<>();
+ }
+ bindings.put(name, binding);
+ }
+
+ public boolean hasOverride() {
+ return this.override;
+ }
+
+ public void setOverride(boolean override) {
+ this.override = override;
+ }
+
+ public String getDispatcher() {
+ return dispatcher;
+ }
+
+ public void setDispatcher(String dispatcher) {
+ this.dispatcher = dispatcher;
+ }
+
+ public String getDispatcherRules() {
+ return dispatcherRules;
+ }
+
+ public void setDispatcherRules(String dispatcherRules) {
+ this.dispatcherRules = dispatcherRules;
+ }
+
+ public Long getDefaultDelay() {
+ return defaultDelay;
+ }
+
+ public void setDefaultDelay(Long defaultDelay) {
+ this.defaultDelay = defaultDelay;
+ }
+
+ public Set getResourcePaths() {
+ return resourcePaths;
+ }
+
+ public void setResourcePaths(Set resourcePaths) {
+ this.resourcePaths = resourcePaths;
+ }
+
+ public void addResourcePath(String resourcePath) {
+ if (this.resourcePaths == null) {
+ this.resourcePaths = new HashSet<>();
+ }
+ if (!this.resourcePaths.contains(resourcePath)) {
+ this.resourcePaths.add(resourcePath);
+ }
+ }
+
+ public Set getParameterConstraints() {
+ return parameterConstraints;
+ }
+
+ public void setParameterConstraints(Set parameterConstraints) {
+ this.parameterConstraints = parameterConstraints;
+ }
+
+ public void addParameterConstraint(ParameterConstraint constraint) {
+ if (this.parameterConstraints == null) {
+ this.parameterConstraints = new HashSet<>();
+ }
+ parameterConstraints.add(constraint);
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/OperationsHeaders.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/OperationsHeaders.java
new file mode 100644
index 000000000..1ee5ea70c
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/OperationsHeaders.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import java.util.HashMap;
+import java.util.Set;
+
+/**
+ * Specification of additional headers for a Service/API operations. Keys are operation name or "globals" (if header
+ * applies to all), values are Header objects.
+ * @author laurent
+ */
+public class OperationsHeaders extends HashMap> {
+
+ public static final String GLOBALS = "globals";
+
+ public Set getGlobals() {
+ return this.get(GLOBALS);
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Parameter.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Parameter.java
new file mode 100644
index 000000000..09ce0a043
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Parameter.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+/**
+ * Companion objects for Request representing query parameter.
+ * @author laurent
+ */
+public class Parameter {
+
+ private String name;
+ private String value;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ParameterConstraint.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ParameterConstraint.java
new file mode 100644
index 000000000..a51ee00e7
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ParameterConstraint.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import java.util.Objects;
+
+/**
+ * Companion object for Operation that may be used to express constraints on request parameters.
+ * @author laurent
+ */
+public class ParameterConstraint {
+
+ private String name;
+ private ParameterLocation in;
+ private boolean required;
+ private boolean recopy;
+ private String mustMatchRegexp;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public ParameterLocation getIn() {
+ return in;
+ }
+
+ public void setIn(ParameterLocation in) {
+ this.in = in;
+ }
+
+ public boolean isRequired() {
+ return required;
+ }
+
+ public void setRequired(boolean required) {
+ this.required = required;
+ }
+
+ public boolean isRecopy() {
+ return recopy;
+ }
+
+ public void setRecopy(boolean recopy) {
+ this.recopy = recopy;
+ }
+
+ public String getMustMatchRegexp() {
+ return mustMatchRegexp;
+ }
+
+ public void setMustMatchRegexp(String mustMatchRegexp) {
+ this.mustMatchRegexp = mustMatchRegexp;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
+ ParameterConstraint that = (ParameterConstraint) o;
+ return Objects.equals(name, that.name) && in == that.in;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, in);
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ParameterLocation.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ParameterLocation.java
new file mode 100644
index 000000000..3ef76f780
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ParameterLocation.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+/**
+ * Enumeration of locations for operation parameters.
+ * @author laurent
+ */
+public enum ParameterLocation {
+ path,
+ query,
+ header,
+ cookie
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Request.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Request.java
new file mode 100644
index 000000000..9bb49e228
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Request.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import org.springframework.data.annotation.Id;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Domain object representing a Microservice operation / action invocation request.
+ * @author laurent
+ */
+public class Request extends Message {
+
+ @Id
+ private String id;
+ private String responseId;
+
+ private List queryParameters;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getResponseId() {
+ return responseId;
+ }
+
+ public void setResponseId(String responseId) {
+ this.responseId = responseId;
+ }
+
+ public List getQueryParameters() {
+ return queryParameters;
+ }
+
+ public void setQueryParameters(List queryParameters) {
+ this.queryParameters = queryParameters;
+ }
+
+ public void addQueryParameter(Parameter parameter) {
+ if (this.queryParameters == null) {
+ this.queryParameters = new ArrayList<>();
+ }
+ queryParameters.add(parameter);
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/RequestResponsePair.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/RequestResponsePair.java
new file mode 100644
index 000000000..c0c5c0557
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/RequestResponsePair.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Simple bean representing a request/response pair.
+ * @author laurent
+ */
+public class RequestResponsePair extends Exchange {
+
+ private Request request;
+ private Response response;
+
+ @JsonCreator
+ public RequestResponsePair(@JsonProperty("request") Request request, @JsonProperty("response") Response response) {
+ this.request = request;
+ this.response = response;
+ }
+
+ public Request getRequest() {
+ return request;
+ }
+
+ public void setRequest(Request request) {
+ this.request = request;
+ }
+
+ public Response getResponse() {
+ return response;
+ }
+
+ public void setResponse(Response response) {
+ this.response = response;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Resource.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Resource.java
new file mode 100644
index 000000000..38eb40daa
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Resource.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import org.springframework.data.annotation.Id;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Domain object representing a Resource: a contractualization companion to microservices Service managed with this
+ * application. These are typically retrieved using the serviceId.
+ * @author laurent
+ */
+public class Resource {
+
+ @Id
+ private String id;
+ private String name;
+ private String path;
+ private String content;
+ private ResourceType type;
+ private String serviceId;
+ private String sourceArtifact;
+ private boolean mainArtifact = false;
+ private Set operations;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ public String getContent() {
+ return content;
+ }
+
+ public void setContent(String content) {
+ this.content = content;
+ }
+
+ public ResourceType getType() {
+ return type;
+ }
+
+ public void setType(ResourceType type) {
+ this.type = type;
+ }
+
+ public String getServiceId() {
+ return serviceId;
+ }
+
+ public void setServiceId(String serviceId) {
+ this.serviceId = serviceId;
+ }
+
+ public String getSourceArtifact() {
+ return sourceArtifact;
+ }
+
+ public void setSourceArtifact(String sourceArtifact) {
+ this.sourceArtifact = sourceArtifact;
+ }
+
+ public boolean isMainArtifact() {
+ return mainArtifact;
+ }
+
+ public void setMainArtifact(boolean mainArtifact) {
+ this.mainArtifact = mainArtifact;
+ }
+
+ public Set getOperations() {
+ return operations;
+ }
+
+ public void setOperations(Set operations) {
+ this.operations = operations;
+ }
+
+ public void addOperation(String operation) {
+ if (operations == null) {
+ operations = new HashSet<>();
+ }
+ operations.add(operation);
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ResourceType.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ResourceType.java
new file mode 100644
index 000000000..ba34ce946
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ResourceType.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+/**
+ * Enumeration of types of resources managed by microservices.
+ * @author laurent
+ */
+public enum ResourceType {
+ WSDL,
+ XSD,
+ JSON_SCHEMA,
+ SWAGGER,
+ RAML,
+ OPEN_API_SPEC,
+ OPEN_API_SCHEMA,
+ ASYNC_API_SPEC,
+ ASYNC_API_SCHEMA,
+ AVRO_SCHEMA,
+ PROTOBUF_SCHEMA,
+ PROTOBUF_DESCRIPTOR,
+ GRAPHQL_SCHEMA,
+ POSTMAN_COLLECTION,
+ SOAP_UI_PROJECT,
+ JSON_FRAGMENT
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Response.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Response.java
new file mode 100644
index 000000000..547aef85b
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Response.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import org.springframework.data.annotation.Id;
+
+/**
+ * Domain object representing a microservice operation / rest action invocation response. Holds information wether it's
+ * a fault or not and on status code and mediaType to use for return. Responses are typically retrieved using
+ * dispatchCriteria extracted from a corresponding request message.
+ * @author laurent
+ */
+public class Response extends Message {
+
+ @Id
+ private String id;
+ private String status;
+ private String mediaType;
+ private String dispatchCriteria;
+ private boolean isFault = false;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public String getMediaType() {
+ return mediaType;
+ }
+
+ public void setMediaType(String mediaType) {
+ this.mediaType = mediaType;
+ }
+
+ public String getDispatchCriteria() {
+ return dispatchCriteria;
+ }
+
+ public void setDispatchCriteria(String dispatchCriteria) {
+ this.dispatchCriteria = dispatchCriteria;
+ }
+
+ public boolean isFault() {
+ return isFault;
+ }
+
+ public void setFault(boolean isFault) {
+ this.isFault = isFault;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Secret.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Secret.java
new file mode 100644
index 000000000..2b40c575e
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Secret.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import org.springframework.data.annotation.Id;
+
+/**
+ * Domain class representing a Secret used for authenticating.
+ * @author laurent
+ */
+public class Secret {
+
+ @Id
+ private String id;
+ private String name;
+ private String description;
+
+ private String username;
+ private String password;
+
+ private String token;
+ private String tokenHeader;
+
+ private String caCertPem;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getToken() {
+ return token;
+ }
+
+ public void setToken(String token) {
+ this.token = token;
+ }
+
+ public String getTokenHeader() {
+ return tokenHeader;
+ }
+
+ public void setTokenHeader(String tokenHeader) {
+ this.tokenHeader = tokenHeader;
+ }
+
+ public String getCaCertPem() {
+ return caCertPem;
+ }
+
+ public void setCaCertPem(String caCertPem) {
+ this.caCertPem = caCertPem;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/SecretRef.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/SecretRef.java
new file mode 100644
index 000000000..95d32e493
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/SecretRef.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+/**
+ * A lightweight reference to a Secret object.
+ * @author laurent
+ */
+public class SecretRef {
+
+ private String secretId;
+ private String name;
+
+ public SecretRef() {
+ }
+
+ public SecretRef(String secretId, String name) {
+ this.secretId = secretId;
+ this.name = name;
+ }
+
+ public String getSecretId() {
+ return secretId;
+ }
+
+ public void setSecretId(String secretId) {
+ this.secretId = secretId;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Service.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Service.java
new file mode 100644
index 000000000..87145f781
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Service.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import org.springframework.data.annotation.Id;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Domain class representing a MicroService and the operations / actions it's holding.
+ * @author laurent
+ */
+public class Service {
+
+ @Id
+ private String id;
+ private String name;
+ private String version;
+ private String xmlNS;
+ private ServiceType type;
+ private Metadata metadata;
+ private String sourceArtifact;
+
+ private List operations = new ArrayList<>();
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getXmlNS() {
+ return xmlNS;
+ }
+
+ public void setXmlNS(String xmlNS) {
+ this.xmlNS = xmlNS;
+ }
+
+ public ServiceType getType() {
+ return type;
+ }
+
+ public void setType(ServiceType type) {
+ this.type = type;
+ }
+
+ public String getSourceArtifact() {
+ return sourceArtifact;
+ }
+
+ public void setSourceArtifact(String sourceArtifact) {
+ this.sourceArtifact = sourceArtifact;
+ }
+
+ public List getOperations() {
+ return operations;
+ }
+
+ public void setOperations(List operations) {
+ this.operations = operations;
+ }
+
+ public void addOperation(Operation operation) {
+ if (this.operations == null) {
+ this.operations = new ArrayList<>();
+ }
+ operations.add(operation);
+ }
+
+ public Metadata getMetadata() {
+ return metadata;
+ }
+
+ public void setMetadata(Metadata metadata) {
+ this.metadata = metadata;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ServiceRef.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ServiceRef.java
new file mode 100644
index 000000000..f9ee99080
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ServiceRef.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+/**
+ * Representation of a reference to a Service.
+ * @author laurent
+ */
+public class ServiceRef {
+
+ private String serviceId;
+ private String name;
+ private String version;
+
+ public ServiceRef() {
+ }
+
+ public ServiceRef(String serviceId, String name, String version) {
+ this.serviceId = serviceId;
+ this.name = name;
+ this.version = version;
+ }
+
+ public String getServiceId() {
+ return serviceId;
+ }
+
+ public void setServiceId(String serviceId) {
+ this.serviceId = serviceId;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ServiceState.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ServiceState.java
new file mode 100644
index 000000000..91c82b460
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ServiceState.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import org.springframework.data.annotation.Id;
+import org.springframework.data.mongodb.core.index.Indexed;
+import org.springframework.data.mongodb.core.mapping.Document;
+
+import java.util.Date;
+
+/**
+ * An ephemeral Service state that can be used to create stateful mocks.
+ * @author laurent
+ */
+@Document
+public class ServiceState {
+
+ @Id
+ private String id;
+ private String serviceId;
+ private String key;
+ private String value;
+ @Indexed(expireAfterSeconds = 0)
+ private Date expireAt;
+
+
+ /** Build a ServiceState. */
+ public ServiceState() {
+ }
+
+ /**
+ * Build a ServiceState with required information.
+ * @param serviceId The unique identifier of Service this state relates to
+ * @param key The key a value will be stored for
+ */
+ public ServiceState(String serviceId, String key) {
+ this.serviceId = serviceId;
+ this.key = key;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getServiceId() {
+ return serviceId;
+ }
+
+ public void setServiceId(String serviceId) {
+ this.serviceId = serviceId;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public Date getExpireAt() {
+ return expireAt;
+ }
+
+ public void setExpireAt(Date expireAt) {
+ this.expireAt = expireAt;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ServiceType.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ServiceType.java
new file mode 100644
index 000000000..db8e30cd6
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ServiceType.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+/**
+ * Types for managed Microservices.
+ * @author laurent
+ */
+public enum ServiceType {
+ SOAP_HTTP,
+ REST,
+ GENERIC_REST,
+ EVENT,
+ GENERIC_EVENT,
+ GRPC,
+ GRAPHQL
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ServiceView.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ServiceView.java
new file mode 100644
index 000000000..e90d94a5a
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/ServiceView.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Aggregate bean for grouping a Service and its messages pairs.
+ * @author laurent
+ */
+public class ServiceView {
+
+ private Service service;
+ private Map> messagesMap;
+
+ @JsonCreator
+ public ServiceView(@JsonProperty("service") Service service,
+ @JsonProperty("messagesMap") Map> messagesMap) {
+ this.service = service;
+ this.messagesMap = messagesMap;
+ }
+
+ public Service getService() {
+ return service;
+ }
+
+ public Map> getMessagesMap() {
+ return messagesMap;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestCaseResult.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestCaseResult.java
new file mode 100644
index 000000000..f8fe3cc91
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestCaseResult.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Companion objects for TestResult. Each TestCaseResult correspond to a particuliar service operation / action
+ * reference by the operationName field. TestCaseResults owns a collection of TestStepResults (one for every request
+ * associated to service operation / action).
+ * @author laurent
+ */
+public class TestCaseResult {
+
+ private boolean success = false;
+ private long elapsedTime = -1;
+ private String operationName;
+
+ private List testStepResults = new ArrayList<>();
+
+ public boolean isSuccess() {
+ return success;
+ }
+
+ public void setSuccess(boolean success) {
+ this.success = success;
+ }
+
+ public long getElapsedTime() {
+ return elapsedTime;
+ }
+
+ public void setElapsedTime(long elapsedTime) {
+ this.elapsedTime = elapsedTime;
+ }
+
+ public String getOperationName() {
+ return operationName;
+ }
+
+ public void setOperationName(String operationName) {
+ this.operationName = operationName;
+ }
+
+ public List getTestStepResults() {
+ return testStepResults;
+ }
+
+ public void setTestStepResults(List testStepResults) {
+ this.testStepResults = testStepResults;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestConformanceMetric.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestConformanceMetric.java
new file mode 100644
index 000000000..b6ce47f04
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestConformanceMetric.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import org.springframework.data.annotation.Id;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Domain object representing the test conformance metrics (current and configurable depth history) for a Service
+ * objects. If classification is allowed then aggregation can be realized using the {@code aggregationLabelValue} field.
+ * @author laurent
+ */
+public class TestConformanceMetric {
+
+ @Id
+ private String id;
+ private String serviceId;
+ private String aggregationLabelValue;
+
+ private double maxPossibleScore;
+ private double currentScore;
+ private String lastUpdateDay;
+
+ private Trend latestTrend = Trend.STABLE;
+ private Map latestScores = new HashMap<>();
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getServiceId() {
+ return serviceId;
+ }
+
+ public void setServiceId(String serviceId) {
+ this.serviceId = serviceId;
+ }
+
+ public String getAggregationLabelValue() {
+ return aggregationLabelValue;
+ }
+
+ public void setAggregationLabelValue(String aggregationLabelValue) {
+ this.aggregationLabelValue = aggregationLabelValue;
+ }
+
+ public double getMaxPossibleScore() {
+ return maxPossibleScore;
+ }
+
+ public void setMaxPossibleScore(double maxPossibleScore) {
+ this.maxPossibleScore = maxPossibleScore;
+ }
+
+ public double getCurrentScore() {
+ return currentScore;
+ }
+
+ public void setCurrentScore(double currentScore) {
+ this.currentScore = currentScore;
+ }
+
+ public String getLastUpdateDay() {
+ return lastUpdateDay;
+ }
+
+ public void setLastUpdateDay(String lastUpdateDay) {
+ this.lastUpdateDay = lastUpdateDay;
+ }
+
+ public Trend getLatestTrend() {
+ return latestTrend;
+ }
+
+ public void setLatestTrend(Trend latestTrend) {
+ this.latestTrend = latestTrend;
+ }
+
+ public Map getLatestScores() {
+ return latestScores;
+ }
+
+ public void setLatestScores(Map latestScores) {
+ this.latestScores = latestScores;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestOptionals.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestOptionals.java
new file mode 100644
index 000000000..19b6d55a1
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestOptionals.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import java.util.List;
+
+/**
+ * Simple bean representing the optional elements of a Test requests. Some of them are made to be persisted into
+ * TestResult, some other are just volatile information for execution.
+ * @author laurent
+ */
+public class TestOptionals {
+
+ private SecretRef secretRef;
+ private Long timeout;
+ private List filteredOperations;
+ private OperationsHeaders operationsHeaders;
+ private OAuth2ClientContext oAuth2Context;
+
+ public TestOptionals() {
+ }
+
+ public TestOptionals(SecretRef secretRef, Long timeout, List filteredOperations,
+ OperationsHeaders operationsHeaders, OAuth2ClientContext oAuth2Context) {
+ this.secretRef = secretRef;
+ this.timeout = timeout;
+ this.filteredOperations = filteredOperations;
+ this.operationsHeaders = operationsHeaders;
+ this.oAuth2Context = oAuth2Context;
+ }
+
+ public SecretRef getSecretRef() {
+ return secretRef;
+ }
+
+ public void setSecretRef(SecretRef secretRef) {
+ this.secretRef = secretRef;
+ }
+
+ public Long getTimeout() {
+ return timeout;
+ }
+
+ public void setTimeout(Long timeout) {
+ this.timeout = timeout;
+ }
+
+ public List getFilteredOperations() {
+ return filteredOperations;
+ }
+
+ public void setFilteredOperations(List filteredOperations) {
+ this.filteredOperations = filteredOperations;
+ }
+
+ public OperationsHeaders getOperationsHeaders() {
+ return operationsHeaders;
+ }
+
+ public void setOperationsHeaders(OperationsHeaders operationsHeaders) {
+ this.operationsHeaders = operationsHeaders;
+ }
+
+ public OAuth2ClientContext getOAuth2Context() {
+ return oAuth2Context;
+ }
+
+ public void setOAuth2Context(OAuth2ClientContext oAuth2Context) {
+ this.oAuth2Context = oAuth2Context;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestResult.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestResult.java
new file mode 100644
index 000000000..55604057f
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestResult.java
@@ -0,0 +1,172 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import org.springframework.data.annotation.Id;
+import org.springframework.data.annotation.Version;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Domain object representing the result of a microservice test run by Microcks. Test are related to a service and made
+ * of multiple test cases corresponding to every operations / actions composing service. Tests are run against a
+ * specific endpoint named testedEndpoint. It holds global markers telling if test still ran, is a success, how many
+ * times is has taken and so on ...
+ * @author laurent
+ */
+public class TestResult {
+
+ @Id
+ private String id;
+ @Version
+ Long version;
+ private Long testNumber;
+ private Date testDate;
+ private String testedEndpoint;
+ private String serviceId;
+ private SecretRef secretRef;
+ private long timeout;
+ private long elapsedTime;
+ private boolean success = false;
+ private boolean inProgress = true;
+ private TestRunnerType runnerType;
+ private OperationsHeaders operationsHeaders;
+ private OAuth2AuthorizedClient authorizedClient;
+
+ private List testCaseResults = new ArrayList<>();
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public Long getVersion() {
+ return version;
+ }
+
+ public void setVersion(Long version) {
+ this.version = version;
+ }
+
+ public Long getTestNumber() {
+ return testNumber;
+ }
+
+ public void setTestNumber(Long testNumber) {
+ this.testNumber = testNumber;
+ }
+
+ public Date getTestDate() {
+ return testDate;
+ }
+
+ public void setTestDate(Date testDate) {
+ this.testDate = testDate;
+ }
+
+ public String getTestedEndpoint() {
+ return testedEndpoint;
+ }
+
+ public void setTestedEndpoint(String testedEndpoint) {
+ this.testedEndpoint = testedEndpoint;
+ }
+
+ public String getServiceId() {
+ return serviceId;
+ }
+
+ public void setServiceId(String serviceId) {
+ this.serviceId = serviceId;
+ }
+
+ public SecretRef getSecretRef() {
+ return secretRef;
+ }
+
+ public void setSecretRef(SecretRef secretRef) {
+ this.secretRef = secretRef;
+ }
+
+ public long getTimeout() {
+ return timeout;
+ }
+
+ public void setTimeout(long timeout) {
+ this.timeout = timeout;
+ }
+
+ public long getElapsedTime() {
+ return elapsedTime;
+ }
+
+ public void setElapsedTime(long elapsedTime) {
+ this.elapsedTime = elapsedTime;
+ }
+
+ public boolean isSuccess() {
+ return success;
+ }
+
+ public void setSuccess(boolean success) {
+ this.success = success;
+ }
+
+ public boolean isInProgress() {
+ return inProgress;
+ }
+
+ public void setInProgress(boolean inProgress) {
+ this.inProgress = inProgress;
+ }
+
+ public TestRunnerType getRunnerType() {
+ return runnerType;
+ }
+
+ public void setRunnerType(TestRunnerType runnerType) {
+ this.runnerType = runnerType;
+ }
+
+ public OperationsHeaders getOperationsHeaders() {
+ return operationsHeaders;
+ }
+
+ public void setOperationsHeaders(OperationsHeaders operationsHeaders) {
+ this.operationsHeaders = operationsHeaders;
+ }
+
+ public List getTestCaseResults() {
+ return testCaseResults;
+ }
+
+ public void setTestCaseResults(List testCaseResults) {
+ this.testCaseResults = testCaseResults;
+ }
+
+ public OAuth2AuthorizedClient getAuthorizedClient() {
+ return authorizedClient;
+ }
+
+ public void setAuthorizedClient(OAuth2AuthorizedClient authorizedClient) {
+ this.authorizedClient = authorizedClient;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestReturn.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestReturn.java
new file mode 100644
index 000000000..b41d8d58f
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestReturn.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+/**
+ * A simple bean for wrapping a test exchange (whether request/response or async event) code, elapsed time and exchange
+ * content.
+ * @author laurent
+ */
+public class TestReturn {
+
+ public static final int SUCCESS_CODE = 0;
+ public static final int FAILURE_CODE = 1;
+
+ private int code;
+ private long elapsedTime;
+ private String message;
+ private Request request;
+ private Response response;
+ private EventMessage eventMessage;
+
+ /** Default constructor for enabling bean serialization. */
+ public TestReturn() {
+ }
+
+ /**
+ * Build a TestReturn for event based exchange with its code.
+ * @param code The code (may be success of failure)
+ * @param elapsedTime Time taken for a test
+ * @param eventMessage The event message for this test
+ */
+ public TestReturn(int code, long elapsedTime, EventMessage eventMessage) {
+ this.code = code;
+ this.elapsedTime = elapsedTime;
+ this.eventMessage = eventMessage;
+ }
+
+ /**
+ * Build a TestReturn for event based exchange with its code.
+ * @param code The code (may be success of failure)
+ * @param elapsedTime Time taken for a test
+ * @param message The return message for this test
+ * @param eventMessage The event message for this test
+ */
+ public TestReturn(int code, long elapsedTime, String message, EventMessage eventMessage) {
+ this.code = code;
+ this.elapsedTime = elapsedTime;
+ this.message = message;
+ this.eventMessage = eventMessage;
+ }
+
+ /**
+ * Build a TestReturn with its code and response.
+ * @param code The code (may be success of failure)
+ * @param elapsedTime Time taken for a test
+ * @param request The request for this test
+ * @param response The response for this test
+ */
+ public TestReturn(int code, long elapsedTime, Request request, Response response) {
+ this.code = code;
+ this.elapsedTime = elapsedTime;
+ this.request = request;
+ this.response = response;
+ }
+
+ /**
+ * Build a TestReturn with its code and response.
+ * @param code The code (may be success of failure)
+ * @param elapsedTime Time taken for a test
+ * @param message The return message for this test
+ * @param request The request for this test
+ * @param response The response for this test
+ */
+ public TestReturn(int code, long elapsedTime, String message, Request request, Response response) {
+ this.code = code;
+ this.elapsedTime = elapsedTime;
+ this.message = message;
+ this.request = request;
+ this.response = response;
+ }
+
+ /** @return Return code */
+ public int getCode() {
+ return code;
+ }
+
+ /** @return Elapsed time */
+ public long getElapsedTime() {
+ return elapsedTime;
+ }
+
+ /** @return Test return message */
+ public String getMessage() {
+ return message;
+ }
+
+ /** @return Request content */
+ public Request getRequest() {
+ return request;
+ }
+
+ /** @return Response content */
+ public Response getResponse() {
+ return response;
+ }
+
+ /** @return EventMessage content */
+ public EventMessage getEventMessage() {
+ return eventMessage;
+ }
+
+ /** @return True is this test return is for a request/response exchange test */
+ public boolean isRequestResponseTest() {
+ return request != null && response != null;
+ }
+
+ /** @return True if this test return is for an asynchronous event test */
+ public boolean isEventTest() {
+ return eventMessage != null;
+ }
+
+ /**
+ * Build a TestStepResult from inner elements.
+ * @return A new TestStepResult ready to attached to a test case.
+ */
+ public TestStepResult buildTestStepResult() {
+ TestStepResult result = new TestStepResult();
+ result.setElapsedTime(elapsedTime);
+ result.setSuccess(code == SUCCESS_CODE);
+ result.setMessage(message);
+ if (request != null) {
+ result.setRequestName(request.getName());
+ }
+ if (eventMessage != null) {
+ result.setEventMessageName(eventMessage.getName());
+ }
+ return result;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestRunnerType.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestRunnerType.java
new file mode 100644
index 000000000..51465c7db
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestRunnerType.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+/**
+ * Enumeration of runner types available in application.
+ * @author laurent
+ */
+public enum TestRunnerType {
+ HTTP,
+ SOAP_HTTP,
+ SOAP_UI,
+ POSTMAN,
+ OPEN_API_SCHEMA,
+ ASYNC_API_SCHEMA,
+ GRPC_PROTOBUF,
+ GRAPHQL_SCHEMA
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestStepResult.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestStepResult.java
new file mode 100644
index 000000000..ed8f45bda
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/TestStepResult.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+/**
+ * TestStepResult is an entity embedded within TestCaseResult. They are created for each request or message associated
+ * with an operation / action of a microservice.
+ * @author laurent
+ */
+public class TestStepResult {
+
+ private boolean success = false;
+ private long elapsedTime;
+ private String requestName;
+ private String eventMessageName;
+ private String message;
+
+ public boolean isSuccess() {
+ return success;
+ }
+
+ public void setSuccess(boolean success) {
+ this.success = success;
+ }
+
+ public long getElapsedTime() {
+ return elapsedTime;
+ }
+
+ public void setElapsedTime(long elapsedTime) {
+ this.elapsedTime = elapsedTime;
+ }
+
+ public String getRequestName() {
+ return requestName;
+ }
+
+ public void setRequestName(String requestName) {
+ this.requestName = requestName;
+ }
+
+ public String getEventMessageName() {
+ return eventMessageName;
+ }
+
+ public void setEventMessageName(String eventMessageName) {
+ this.eventMessageName = eventMessageName;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Trend.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Trend.java
new file mode 100644
index 000000000..ae4261360
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/Trend.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+/**
+ * Enumeration type for evolution trend.
+ * @author laurent
+ */
+public enum Trend {
+ DOWN,
+ LOW_DOWN,
+ STABLE,
+ LOW_UP,
+ UP
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/UnidirectionalEvent.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/UnidirectionalEvent.java
new file mode 100644
index 000000000..8fcafdb8b
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/UnidirectionalEvent.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Simple bean representing an unidirectional exchange as an event message.
+ * @author laurent
+ */
+public class UnidirectionalEvent extends Exchange {
+
+ private EventMessage eventMessage;
+
+ @JsonCreator
+ public UnidirectionalEvent(@JsonProperty("eventMessage") EventMessage eventMessage) {
+ this.eventMessage = eventMessage;
+ }
+
+ public EventMessage getEventMessage() {
+ return eventMessage;
+ }
+
+ public void setEventMessage(EventMessage eventMessage) {
+ this.eventMessage = eventMessage;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/WeightedMetricValue.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/WeightedMetricValue.java
new file mode 100644
index 000000000..30c5b8591
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/domain/WeightedMetricValue.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.domain;
+
+/**
+ * A metric value that has a weight (typically an aggregation result).
+ * @author laurent
+ */
+public class WeightedMetricValue {
+
+ private String name;
+ private int weight;
+ private double value;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public int getWeight() {
+ return weight;
+ }
+
+ public void setWeight(int weight) {
+ this.weight = weight;
+ }
+
+ public double getValue() {
+ return value;
+ }
+
+ public void setValue(double value) {
+ this.value = value;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/event/ChangeType.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/event/ChangeType.java
new file mode 100644
index 000000000..a782519d4
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/event/ChangeType.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.event;
+
+/**
+ * Enumeration of types for domain objects changes.
+ * @author laurent
+ */
+public enum ChangeType {
+ CREATED,
+ UPDATED,
+ DELETED
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/event/ServiceViewChangeEvent.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/event/ServiceViewChangeEvent.java
new file mode 100644
index 000000000..11ea045b2
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/event/ServiceViewChangeEvent.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.event;
+
+import io.github.microcks.domain.ServiceView;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * This represents a domain event around ServiceView change.
+ * @author laurent
+ */
+public class ServiceViewChangeEvent {
+
+ private String serviceId;
+ private ServiceView serviceView;
+ private ChangeType changeType;
+ private long timestamp;
+
+ @JsonCreator
+ public ServiceViewChangeEvent(@JsonProperty("serviceId") String serviceId,
+ @JsonProperty("serviceView") ServiceView serviceView, @JsonProperty("changeType") ChangeType changeType,
+ @JsonProperty("timestamp") long timestamp) {
+ this.serviceId = serviceId;
+ this.serviceView = serviceView;
+ this.changeType = changeType;
+ this.timestamp = timestamp;
+ }
+
+ public String getServiceId() {
+ return serviceId;
+ }
+
+ public ServiceView getServiceView() {
+ return serviceView;
+ }
+
+ public ChangeType getChangeType() {
+ return changeType;
+ }
+
+ public long getTimestamp() {
+ return timestamp;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/util/IdBuilder.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/util/IdBuilder.java
new file mode 100644
index 000000000..f6b94f2d7
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/util/IdBuilder.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util;
+
+import io.github.microcks.domain.Operation;
+import io.github.microcks.domain.Service;
+import io.github.microcks.domain.TestResult;
+
+/**
+ * Helper class for building composite/aggregates keys or Ids.
+ * @author laurent
+ */
+public class IdBuilder {
+
+ /**
+ * Private Constructor. So that the utility class cannot be instanced
+ */
+ private IdBuilder() {
+ }
+
+ /**
+ * Build a unique operation Id from service and operation.
+ * @param service The domain service holding operation
+ * @param operation A domain bean representing operation to build an id for
+ * @return A unique identifier for operation.
+ */
+ public static String buildOperationId(Service service, Operation operation) {
+ return service.getId() + "-" + operation.getName();
+ }
+
+ /**
+ * Build a unique TestCase Id from test result and operation.
+ * @param testResult The domain testResult holding test case
+ * @param operation A domain bean representing operation matching case
+ * @return A unique identifier for test case.
+ */
+ public static String buildTestCaseId(TestResult testResult, Operation operation) {
+ return testResult.getId() + "-" + testResult.getTestNumber() + "-" + operation.getName();
+ }
+
+ /**
+ * Build a unique TestCase Id from test result and operation.
+ * @param testResult The domain testResult holding test case
+ * @param operationName A string representing matching operation name case
+ * @return A unique identifier for test case.
+ */
+ public static String buildTestCaseId(TestResult testResult, String operationName) {
+ return testResult.getId() + "-" + testResult.getTestNumber() + "-" + operationName;
+ }
+
+ /**
+ * Build the full name of a Resource dedicated to no particular operations of a Service. Such Resource is typically a
+ * global Schema dependency that defines shared data types, so that you'll be able to easily retrieve it later.
+ * @param service The domain service owning this resource
+ * @param resourceName The name of resource
+ * @return A full name for this globally attached resource.
+ */
+ public static String buildResourceFullName(Service service, String resourceName) {
+ return service.getName() + "-" + service.getVersion() + "-" + Sanitizer.urlSanitize(resourceName);
+ }
+
+ /**
+ * Build the full name of a Resource dedicated to no particular operations of a Service. Such Resource is typically a
+ * global Schema dependency that defines shared data types, so that you'll be able to easily retrieve it later.
+ * @param service The domain service owning this resource
+ * @param resourceName The name of resource
+ * @param context The context this resource belongs to
+ * @return A full name for this globally attached resource.
+ */
+ public static String buildResourceFullName(Service service, String resourceName, String context) {
+ return service.getName() + "-" + service.getVersion() + "-" + Sanitizer.urlSanitize(context.replace(".", ""))
+ + "-" + Sanitizer.urlSanitize(resourceName);
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/util/Sanitizer.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/util/Sanitizer.java
new file mode 100644
index 000000000..9943665e5
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/main/java/io/github/microcks/util/Sanitizer.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util;
+
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * Utility class for sanitizing strings to be used in a URL.
+ */
+public class Sanitizer {
+ private static final String ALLOWED_CHARS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$-_.+!*'(),";
+ private static final Set ALLOWED_CHARS_SET = ALLOWED_CHARS.chars().mapToObj(c -> (char) c)
+ .collect(Collectors.toSet());
+ private static final Character REPLACE_CHAR = '-';
+
+ private Sanitizer() {
+ // Hide the implicit constructor as it's a utility class.
+ }
+
+ /**
+ * Sanitize a string to be used in a URL. It replaces all characters that are not in the set of allowed characters by
+ * a dash.
+ * @param string the string to sanitize
+ * @return the sanitized string
+ */
+ public static String urlSanitize(String string) {
+ StringBuilder sanitized = new StringBuilder();
+
+ for (char c : string.toCharArray()) {
+ sanitized.append(ALLOWED_CHARS_SET.contains(c) ? c : REPLACE_CHAR);
+ }
+
+ return sanitized.toString();
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/test/java/io/github/microcks/util/SanitizerTest.java b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/test/java/io/github/microcks/util/SanitizerTest.java
new file mode 100644
index 000000000..f7c2810c9
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/model/src/test/java/io/github/microcks/util/SanitizerTest.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.github.microcks.util;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+/**
+ * Test case for the Sanitizer util.
+ * @author laurent
+ */
+class SanitizerTest {
+
+ @Test
+ void testUrlSanitize() {
+ String url = Sanitizer.urlSanitize("weird|~url.json");
+ assertEquals("weird--url.json", url);
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/pom.xml b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/pom.xml
new file mode 100644
index 000000000..9a96a4663
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/pom.xml
@@ -0,0 +1,84 @@
+
+
+
+
+
+ microcks
+ io.github.microcks
+ 1.12.2-SNAPSHOT
+ ../../pom.xml
+
+ 4.0.0
+
+ Microcks EL
+ microcks-el
+
+
+ UTF-8
+ ../..
+ 21
+ 2.0.2
+ 5.10.2
+
+
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
+ org.slf4j
+ slf4j-api
+
+
+ net.datafaker
+ datafaker
+ ${datafaker.version}
+
+
+
+
+ io.github.microcks
+ microcks-model
+ ${project.version}
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter
+ ${junit.version}
+ test
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.1
+
+ ${java.version}
+ ${java.version}
+ ${project.build.sourceEncoding}
+ -Xlint:deprecation
+ -Xlint:unchecked
+
+
+
+
+
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/EvaluableRequest.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/EvaluableRequest.java
new file mode 100644
index 000000000..c258749ab
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/EvaluableRequest.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el;
+
+import java.util.Map;
+
+/**
+ * This is a simple bean wrapping request most common elements and adapted for evaluation within EL expressions.
+ * @author laurent
+ */
+public class EvaluableRequest {
+
+ private String body;
+ private String[] path;
+ private Map params;
+ private Map headers;
+
+ public EvaluableRequest(String body, String[] path) {
+ this.body = body;
+ this.path = path;
+ }
+
+ public String getBody() {
+ return body;
+ }
+
+ public void setBody(String body) {
+ this.body = body;
+ }
+
+ public String[] getPath() {
+ return path;
+ }
+
+ public void setPath(String[] path) {
+ this.path = path;
+ }
+
+ public Map getParams() {
+ return params;
+ }
+
+ public void setParams(Map params) {
+ this.params = params;
+ }
+
+ public Map getHeaders() {
+ return headers;
+ }
+
+ public void setHeaders(Map headers) {
+ this.headers = headers;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/EvaluationContext.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/EvaluationContext.java
new file mode 100644
index 000000000..8d1597136
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/EvaluationContext.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el;
+
+import io.github.microcks.util.el.function.ELFunction;
+
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * A context used during evaluation of EL expressions. Can be used to register functions, store input variables or
+ * intermediary results.
+ * @author laurent
+ */
+public class EvaluationContext {
+
+ private final Map variables = new ConcurrentHashMap<>();
+
+ /**
+ * Put a variable into this context
+ * @param name The name of variable
+ * @param value The variable itself
+ */
+ public void setVariable(String name, Object value) {
+ variables.put(name, value);
+ }
+
+ /**
+ * Put a set of variables into this context
+ * @param variables key/value pairs for variables names and their values
+ */
+ public void setVariables(Map variables) {
+ variables.forEach(this::setVariable);
+ }
+
+ /**
+ * Retrieve a registered variable by its name.
+ * @param name The name of variable to look for
+ * @return The variable having this name or null if no variable.
+ */
+ public Object lookupVariable(String name) {
+ return variables.get(name);
+ }
+
+ /**
+ * Register a function using a name and the ELFunction class.
+ * @param name The name of function to register
+ * @param function The class representing the function
+ * @param Any implementation of {@code ELFunction} interface
+ */
+ public void registerFunction(String name, Class function) {
+ this.variables.put(name, function);
+ }
+
+ /**
+ * Retrieve a registered function by its name.
+ * @param name The name of function to look for
+ * @param Any implementation of {@code ELFunction} interface
+ * @return The Function class object
+ */
+ @SuppressWarnings("unchecked")
+ public Class lookupFunction(String name) {
+ Object function = variables.get(name);
+ if (function instanceof Class functionClazz) {
+ if (ELFunction.class.isAssignableFrom(functionClazz)) {
+ return (Class) functionClazz;
+ }
+ }
+ return null;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/Expression.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/Expression.java
new file mode 100644
index 000000000..176867e25
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/Expression.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el;
+
+/**
+ * Simple interface representing an EL expression. Expression just render a value regarding a specific
+ * {@code EvaluationContext}.
+ * @author laurent
+ */
+public interface Expression {
+
+ /**
+ * Render this expression value within this evaluation context.
+ * @param context The context of current evaluation
+ * @return This expression rendered value
+ */
+ String getValue(EvaluationContext context);
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/ExpressionParser.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/ExpressionParser.java
new file mode 100644
index 000000000..c8d35688a
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/ExpressionParser.java
@@ -0,0 +1,235 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el;
+
+import io.github.microcks.util.el.function.ELFunction;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Helper object for finding and parsing expressions present into a string template. For example, following template:
+ * {@code Hello {{ request.body/name }} it's {{ now() }}} should be decomposed into 4 expressions:
+ *
+ *
A LiteralExpression representing the "Hello " part
+ *
A VariableReferenceExpression representing the "request.body/name part
+ *
A LiteralExpression representing the " it's " part
+ *
A ELFunctionExpression representing the "now()" part
+ *
+ * @author laurent
+ */
+public class ExpressionParser {
+
+ /** A simple logger for diagnostic messages. */
+ private static final Logger log = LoggerFactory.getLogger(ExpressionParser.class);
+
+ // Private constructor to hide the implicit one.
+ private ExpressionParser() {
+ }
+
+ /**
+ * Navigate the template for finding expressions that can be evaluated into this template. Expressions are returned
+ * into an ordered array.
+ * @param template The string to browse
+ * @param context The EvaluationContext that may contains variable or function references
+ * @param expressionPrefix The prefix starting new expression (ex: "{{")
+ * @param expressionSuffix The suffix closing expression (ex: "}}")
+ * @return The array of found expressions when browsing template from left to right
+ */
+ public static Expression[] parseExpressions(String template, EvaluationContext context, String expressionPrefix,
+ String expressionSuffix) throws ParseException {
+ // Prepare an array for results.
+ List expressions = new ArrayList<>();
+ int startIdx = 0;
+
+ while (startIdx < template.length()) {
+ int prefixIndex = template.indexOf(expressionPrefix, startIdx);
+ if (prefixIndex >= startIdx) {
+ // an inner expression was found - this is a composite
+ if (prefixIndex > startIdx) {
+ log.debug("Found a literal expression starting at {}", startIdx);
+ expressions.add(new LiteralExpression(template.substring(startIdx, prefixIndex)));
+ }
+ int afterPrefixIndex = prefixIndex + expressionPrefix.length();
+ int suffixIndex = skipToCorrectEndSuffix(expressionSuffix, template, afterPrefixIndex);
+ if (suffixIndex == -1) {
+ log.info("No ending suffix '{}' for expression starting at character {}: {}", expressionSuffix,
+ prefixIndex, template.substring(prefixIndex));
+ throw new ParseException(template, prefixIndex,
+ "No ending suffix '" + expressionSuffix + "' for expression starting at character " + prefixIndex
+ + ": " + template.substring(prefixIndex));
+ }
+ if (suffixIndex == afterPrefixIndex) {
+ log.info("No expression defined within delimiter '{}' at character {}", expressionPrefix, prefixIndex);
+ throw new ParseException(template, prefixIndex, "No expression defined within delimiter '"
+ + expressionPrefix + expressionSuffix + "' at character " + prefixIndex);
+ }
+ String expr = template.substring(prefixIndex + expressionPrefix.length(), suffixIndex);
+ expr = expr.trim();
+ if (expr.isEmpty()) {
+ log.info("No expression defined within delimiter '{}' at character {}", expressionPrefix, prefixIndex);
+ throw new ParseException(template, prefixIndex, "No expression defined within delimiter '"
+ + expressionPrefix + expressionSuffix + "' at character " + prefixIndex);
+ }
+ if (expr.charAt(0) == '{') {
+ expressions.add(new LiteralExpression(expr.substring(0, 1)));
+ expressions.add(doParseExpression(expr.substring(1, expr.length() - 1), context));
+ expressions.add(new LiteralExpression(expr.substring(expr.length() - 1)));
+ } else
+ expressions.add(doParseExpression(expr, context));
+ startIdx = suffixIndex + expressionSuffix.length();
+ log.debug("Expression accumulated. Pursuing with index {} on {}", startIdx, template.length());
+ } else {
+ // no more expression. finalize with a literal.
+ expressions.add(new LiteralExpression(template.substring(startIdx, template.length())));
+ break;
+ }
+ }
+ return expressions.toArray(new Expression[0]);
+ }
+
+ /** Find for next suitable correct end suffix. Could be extended in future to manager recursivity... */
+ private static int skipToCorrectEndSuffix(String expressionSuffix, String template, int afterPrefixIndex) {
+ int nextSuffix = template.indexOf(expressionSuffix, afterPrefixIndex);
+ if (nextSuffix == -1) {
+ return -1; // the suffix is missing
+ }
+
+ // Check if there are more closing curly braces after the found "}}"
+ int lastIndexOfSuffix = nextSuffix + expressionSuffix.length();
+ while (lastIndexOfSuffix < template.length() && template.charAt(lastIndexOfSuffix) == '}') {
+ lastIndexOfSuffix++;
+ }
+
+ // If we found extra closing curly braces, return the position of the first two "}}"
+ if (lastIndexOfSuffix > nextSuffix + expressionSuffix.length()) {
+ return lastIndexOfSuffix - expressionSuffix.length();
+ }
+
+ return nextSuffix;
+ }
+
+ /**
+ * Depending on expression string, try to guess if it's a Redirect, a Literal, a Function or a VariableReference
+ * expression.
+ */
+ private static Expression doParseExpression(String expressionString, EvaluationContext context) {
+
+ // Check for special exception like RedirectExpression.
+ boolean hasRedirect = expressionString.indexOf(RedirectExpression.REDIRECT_MARKER) != -1;
+ log.debug("hasRedirect:{}", hasRedirect);
+
+ if (hasRedirect) {
+ String[] parts = expressionString.split(RedirectExpression.REDIRECT_MARKER_SPLIT_REGEX);
+ Expression[] expressions = new Expression[parts.length];
+ for (int i = 0; i < parts.length; i++) {
+ expressions[i] = doParseSimpleExpression(parts[i].trim(), context);
+ }
+ return new RedirectExpression(expressions);
+ }
+
+ // Check for special exception like FallbackExpression.
+ boolean hasFallback = expressionString.contains(FallbackExpression.FALLBACK_MARKER);
+ log.debug("hasFallback:{}", hasFallback);
+
+ if (hasFallback) {
+ String[] parts = expressionString.split(FallbackExpression.FALLBACK_MARKER_SPLIT_REGEX);
+ Expression[] expressions = new Expression[parts.length];
+ for (int i = 0; i < parts.length; i++) {
+ expressions[i] = doParseSimpleExpression(parts[i].trim(), context);
+ }
+ return new FallbackExpression(expressions);
+ }
+
+ // Else parse simple expression.
+ return doParseSimpleExpression(expressionString, context);
+ }
+
+ /**
+ * Depending on expression string, try to guess if it's a Literal, a Function or a VariableReference expression.
+ */
+ private static Expression doParseSimpleExpression(String expressionString, EvaluationContext context) {
+ int argsStart = expressionString.indexOf('(');
+ int argsEnd = expressionString.indexOf(')');
+ int variableStart = expressionString.indexOf('.');
+
+ boolean hasVariable = variableStart != -1;
+ boolean hasArgs = (argsStart != 1 && argsEnd != -1 && argsStart < argsEnd);
+ boolean isPostmanFunction = expressionString.startsWith("$");
+ boolean varBeforeArgs = (variableStart < argsStart) && !isPostmanFunction;
+
+ log.debug("hasVariable:{} hasArgs:{} isPostmanFunction:{} varBeforeArgs:{}", hasVariable, hasArgs,
+ isPostmanFunction, varBeforeArgs);
+
+ // Check if it's a VariableReferenceExpression.
+ if (hasVariable && (!hasArgs || varBeforeArgs)) {
+ log.debug("Found a variable reference expression {}", expressionString);
+ String variableName = expressionString.substring(0, expressionString.indexOf('.'));
+ Object variable = context.lookupVariable(variableName);
+ String pathExpression = expressionString.substring(expressionString.indexOf('.') + 1);
+
+ if (variable != null) {
+ return new VariableReferenceExpression(variable, pathExpression);
+ }
+ log.warn("Variable with name {} cannot be found into EvaluationContext. Returning empty literal expression",
+ variableName);
+ return new LiteralExpression("");
+ }
+
+ // Check if it's a ELFunctionExpression
+ if (hasArgs || isPostmanFunction) {
+ log.debug("Found a function expression {}", expressionString);
+ return buildFunctionExpression(expressionString, argsStart, argsEnd, context);
+ }
+
+ log.info("No ELFunction or complex VariableReference expressions found... Returning simple VariableReference");
+ return new VariableReferenceExpression(expressionString);
+ }
+
+ private static Expression buildFunctionExpression(String expressionString, int argsStart, int argsEnd,
+ EvaluationContext context) {
+ String functionName = null;
+ String[] args = new String[0];
+ // Checking for easier Postman compatibility notation first.
+ if (expressionString.startsWith("$")) {
+ functionName = expressionString.substring(1);
+ } else {
+ functionName = expressionString.substring(0, argsStart);
+ String argsString = expressionString.substring(argsStart + 1, argsEnd);
+ // Parse arguments if non empty string.
+ if (!argsString.isEmpty()) {
+ args = Arrays.stream(argsString.split(",")).map(String::trim).toArray(String[]::new);
+ }
+ }
+
+ Class functionClazz = context.lookupFunction(functionName);
+ if (functionClazz != null) {
+ ELFunction function = null;
+ try {
+ function = functionClazz.getDeclaredConstructor().newInstance();
+ return new FunctionExpression(function, args);
+ } catch (Exception e) {
+ log.error("Exception while instantiating the functionClazz " + functionClazz, e);
+ }
+ }
+ // Fallback on empty literal expression.
+ return new LiteralExpression("");
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/FallbackExpression.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/FallbackExpression.java
new file mode 100644
index 000000000..60c2bf755
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/FallbackExpression.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.github.microcks.util.el;
+
+/**
+ * An implementation of {@code Expression} that returns the result of the first expression that is not null or empty.
+ * @author laurent
+ */
+public class FallbackExpression implements Expression {
+
+ public static final String FALLBACK_MARKER = "||";
+
+ public static final String FALLBACK_MARKER_SPLIT_REGEX = "\\|\\|";
+
+ private final Expression[] expressions;
+
+ public FallbackExpression(Expression[] expressions) {
+ this.expressions = expressions;
+ }
+
+ @Override
+ public String getValue(EvaluationContext context) {
+ String result = null;
+ for (Expression expression : expressions) {
+ result = expression.getValue(context);
+ if (result != null && !result.isEmpty()) {
+ break;
+ }
+ }
+ return result;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/FunctionExpression.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/FunctionExpression.java
new file mode 100644
index 000000000..03acc7862
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/FunctionExpression.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el;
+
+import io.github.microcks.util.el.function.ELFunction;
+
+/**
+ * An implementation of {@code Expression} that invokes an {@code ELFunction}
+ * @author laurent
+ */
+public class FunctionExpression implements Expression {
+
+ private final ELFunction function;
+ private final String[] functionArgs;
+
+ /**
+ * Build a new function expression with a function and its invocation arguments.
+ * @param function The ELFunction associated to this expression
+ * @param functionArgs The invocation arguments of this function
+ */
+ public FunctionExpression(ELFunction function, String[] functionArgs) {
+ this.function = function;
+ this.functionArgs = functionArgs;
+ }
+
+ @Override
+ public String getValue(EvaluationContext context) {
+ return function.evaluate(context, functionArgs);
+ }
+
+ public ELFunction getFunction() {
+ return function;
+ }
+
+ public String[] getFunctionArgs() {
+ return functionArgs;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/LiteralExpression.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/LiteralExpression.java
new file mode 100644
index 000000000..cd736bcdf
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/LiteralExpression.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el;
+
+/**
+ * A simple implementation of {@code Expression} that managed literals. The rendered value is the given one, unchanged.
+ * @author laurent
+ */
+public class LiteralExpression implements Expression {
+
+ private final String value;
+
+ /**
+ * Create a new Literal expression with this constant value.
+ * @param value The constant literal value
+ */
+ public LiteralExpression(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String getValue(EvaluationContext context) {
+ return this.value;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/ParseException.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/ParseException.java
new file mode 100644
index 000000000..e2e7a091f
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/ParseException.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el;
+
+/**
+ * Represent an exception that occurs during expression parsing.
+ * @author laurent
+ */
+public class ParseException extends RuntimeException {
+
+ protected String expressionString = null;
+
+ protected int position = 0;
+
+ /**
+ * Create a new default expression parsing exception.
+ * @param message description of the problem that occurred
+ */
+ public ParseException(String message) {
+ super(message);
+ }
+
+ /**
+ * Create a new expression parsing exception.
+ * @param expressionString the expression string that could not be parsed
+ * @param position the position in the expression string where the problem occurred
+ * @param message description of the problem that occurred
+ */
+ public ParseException(String expressionString, int position, String message) {
+ super(message);
+ this.expressionString = expressionString;
+ this.position = position;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/RedirectExpression.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/RedirectExpression.java
new file mode 100644
index 000000000..525461de1
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/RedirectExpression.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el;
+
+import java.util.Arrays;
+
+/**
+ * An implementation of {@code Expression} that redirects the result of a first expression to other ones among a list.
+ * If additional expressions are {@code FunctionExpression}, result is appended to the list of arguments before
+ * expression invocation.
+ * @author laurent
+ */
+public class RedirectExpression implements Expression {
+
+ public static final char REDIRECT_MARKER = '>';
+
+ public static final String REDIRECT_MARKER_SPLIT_REGEX = "\\>";
+
+ private final Expression[] expressions;
+
+ public RedirectExpression(Expression[] expressions) {
+ this.expressions = expressions;
+ }
+
+ @Override
+ public String getValue(EvaluationContext context) {
+ String result = null;
+ if (expressions.length > 0) {
+ // Execute first expression for getting result.
+ result = expressions[0].getValue(context);
+ for (int i = 1; i < expressions.length; i++) {
+ Expression exp = expressions[i];
+ if (exp instanceof FunctionExpression functionExp) {
+ // Clone this expression, enriching args with previous result.
+ String[] clonedArgs = Arrays.copyOf(functionExp.getFunctionArgs(),
+ functionExp.getFunctionArgs().length + 1);
+ clonedArgs[clonedArgs.length - 1] = result;
+ FunctionExpression clonedExp = new FunctionExpression(functionExp.getFunction(), clonedArgs);
+ clonedExp.getValue(context);
+ }
+ }
+ }
+ return result;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/TemplateEngine.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/TemplateEngine.java
new file mode 100644
index 000000000..d44f4a16c
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/TemplateEngine.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el;
+
+/**
+ * An engine that can evaluate String templates holding some Expression Language {@code Expression}. Engine can be
+ * customized setting new expression delimiters (prefix and suffix). It embeds an {@code EvaluationContext} that can
+ * also be customized with variables and function registration before template evaluation using the {@code getValue()}
+ * method.
+ * @author laurent
+ */
+public class TemplateEngine {
+
+ public static final String DEFAULT_EXPRESSION_PREFIX = "{{";
+ public static final String DEFAULT_EXPRESSION_SUFFIX = "}}";
+
+ private String expressionPrefix = DEFAULT_EXPRESSION_PREFIX;
+ private String expressionSuffix = DEFAULT_EXPRESSION_SUFFIX;
+
+ private EvaluationContext context = new EvaluationContext();
+
+ protected TemplateEngine() {
+ }
+
+ public String getExpressionPrefix() {
+ return expressionPrefix;
+ }
+
+ public void setExpressionPrefix(String expressionPrefix) {
+ this.expressionPrefix = expressionPrefix;
+ }
+
+ public String getExpressionSuffix() {
+ return expressionSuffix;
+ }
+
+ public void setExpressionSuffix(String expressionSuffix) {
+ this.expressionSuffix = expressionSuffix;
+ }
+
+ public EvaluationContext getContext() {
+ return context;
+ }
+
+ /**
+ * Evaluate the given string template, finding expressions within and evaluating them.
+ * @param template The string template to render.
+ * @return The rendered value of string template.
+ */
+ public String getValue(String template) {
+ StringBuilder builder = new StringBuilder();
+
+ // Just delegate parsing stuffs to Expression parser to retrieve all the expressions ordered.
+ Expression[] expressions = ExpressionParser.parseExpressions(template, context, expressionPrefix,
+ expressionSuffix);
+
+ // Now just go through expressions and evaluate them.
+ for (Expression expression : expressions) {
+ builder.append(expression.getValue(context));
+ }
+
+ return builder.toString();
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/TemplateEngineFactory.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/TemplateEngineFactory.java
new file mode 100644
index 000000000..058d995b9
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/TemplateEngineFactory.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el;
+
+import io.github.microcks.util.el.function.*;
+
+/**
+ * Helper class holding commodity methods for getting {@code TemplateEngine} instances..
+ * @author laurent
+ */
+public class TemplateEngineFactory {
+
+ /**
+ * Helper method for getting a {@code TemplateEngine} initialized with built-in functions.
+ * @return A new TemplateEngine instance.
+ */
+ public static TemplateEngine getTemplateEngine() {
+ TemplateEngine engine = new TemplateEngine();
+
+ // Register some built-in functions into evaluation context.
+ engine.getContext().registerFunction("now", NowELFunction.class);
+ engine.getContext().registerFunction("timestamp", NowELFunction.class);
+ engine.getContext().registerFunction("uuid", UUIDELFunction.class);
+ engine.getContext().registerFunction("guid", UUIDELFunction.class);
+ engine.getContext().registerFunction("randomUUID", UUIDELFunction.class);
+ engine.getContext().registerFunction("randomInt", RandomIntELFunction.class);
+ engine.getContext().registerFunction("randomString", RandomStringELFunction.class);
+ engine.getContext().registerFunction("randomBoolean", RandomBooleanELFunction.class);
+ engine.getContext().registerFunction("randomValue", RandomValueELFunction.class);
+
+ engine.getContext().registerFunction("randomFirstName", RandomFirstNameELFunction.class);
+ engine.getContext().registerFunction("randomLastName", RandomLastNameELFunction.class);
+ engine.getContext().registerFunction("randomFullName", RandomFullNameELFunction.class);
+ engine.getContext().registerFunction("randomNamePrefix", RandomNamePrefixELFunction.class);
+ engine.getContext().registerFunction("randomNameSuffix", RandomNameSuffixELFunction.class);
+
+ engine.getContext().registerFunction("randomCity", RandomCityELFunction.class);
+ engine.getContext().registerFunction("randomCountry", RandomCountryELFunction.class);
+ engine.getContext().registerFunction("randomCountryCode", RandomCountryCodeELFunction.class);
+ engine.getContext().registerFunction("randomStreetName", RandomStreetNameELFunction.class);
+ engine.getContext().registerFunction("randomStreetAddress", RandomStreetAddressELFunction.class);
+ engine.getContext().registerFunction("randomLatitude", RandomLatitudeELFunction.class);
+ engine.getContext().registerFunction("randomLongitude", RandomLongitudeELFunction.class);
+ engine.getContext().registerFunction("randomPhoneNumber", RandomPhoneNumberELFunction.class);
+
+ engine.getContext().registerFunction("randomEmail", RandomEmailELFunction.class);
+
+ engine.getContext().registerFunction("put", PutInContextELFunction.class);
+
+ return engine;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/VariableReferenceExpression.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/VariableReferenceExpression.java
new file mode 100644
index 000000000..b0c7a27cc
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/VariableReferenceExpression.java
@@ -0,0 +1,218 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el;
+
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import java.io.StringReader;
+import java.lang.reflect.Method;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.xml.sax.InputSource;
+
+/**
+ * An implementation of {@code Expression} that deals with variable references. Such expression is able to evaluate
+ * simple forms like {@code request.body} where {@code request} is provided bean. It is also able to evaluate path-like
+ * sub-queries when variable property value is a JSON or a XML string.
+ * For example, if {@code request.body} is a JSON string, you may use {@code request.body/books/1/author} for extracting
+ * the author value of first book ;-)
+ * @author laurent
+ */
+public class VariableReferenceExpression implements Expression {
+
+ /** A simple logger for diagnostic messages. */
+ private static Logger log = LoggerFactory.getLogger(VariableReferenceExpression.class);
+
+ private static final String ARRAY_INDEX_REGEXP = "\\[(\\d+)\\]";
+ private static final String MAP_INDEX_REGEXP = "\\[([\\.\\w-]+)\\]";
+ private static final Pattern ARRAY_INDEX_PATTERN = Pattern.compile(ARRAY_INDEX_REGEXP);
+ private static final Pattern MAP_INDEX_PATTERN = Pattern.compile(MAP_INDEX_REGEXP);
+
+ private static final String[] PROPERTY_NAME_DELIMITERS = { "/", "[" };
+
+ private Object variable;
+ private String pathExpression;
+
+ private String variableName;
+
+ /**
+ * Create a new expression with a variable and a path (property + sub-query expression).
+ * @param variable Bean from whom to extract value
+ * @param pathExpression Path expression to get value from root object (property name + path sub-query)
+ */
+ public VariableReferenceExpression(Object variable, String pathExpression) {
+ this.variable = variable;
+ this.pathExpression = pathExpression;
+ }
+
+ /**
+ * Create a new expression with a variable name (to be searched later into EvaluationContext)
+ * @param variableName Name of a variable to get from Evaluation context.
+ */
+ public VariableReferenceExpression(String variableName) {
+ this.variableName = variableName;
+ }
+
+ public Object getVariable() {
+ return variable;
+ }
+
+ public void setVariable(Object variable) {
+ this.variable = variable;
+ }
+
+ public String getPathExpression() {
+ return pathExpression;
+ }
+
+ public void setPathExpression(String pathExpression) {
+ this.pathExpression = pathExpression;
+ }
+
+ @Override
+ public String getValue(EvaluationContext context) {
+ // Use variable name if we just provide this.
+ if (variableName != null && variable == null) {
+ variable = context.lookupVariable(variableName);
+ return (variable != null ? variable.toString() : "");
+ }
+
+ String propertyName = pathExpression;
+ String propertyPath = null;
+ int delimiterIndex = -1;
+
+ // Search for a delimiter to isolate property name.
+ for (String delimiter : PROPERTY_NAME_DELIMITERS) {
+ delimiterIndex = pathExpression.indexOf(delimiter);
+ if (delimiterIndex != -1) {
+ propertyName = pathExpression.substring(0, delimiterIndex);
+ propertyPath = pathExpression.substring(delimiterIndex);
+ break;
+ }
+ }
+ Object variableValue = getProperty(variable, propertyName);
+
+ if (log.isDebugEnabled()) {
+ log.debug("propertyName: {}", propertyName);
+ log.debug("propertyPath: {}", propertyPath);
+ log.debug("variableValue: {}", variableValue);
+ }
+
+ if (propertyPath != null) {
+ if (variableValue.getClass().equals(String.class)) {
+ if (propertyPath.startsWith("/")) {
+ // This is a JSON Pointer or XPath expression to apply.
+ String variableString = String.valueOf(variableValue);
+
+ if (variableString.trim().startsWith("{") || variableString.trim().startsWith("[")) {
+ variableValue = getJsonPointerValue(variableString, propertyPath);
+ } else if (variableString.trim().startsWith("<")) {
+ variableValue = getXPathValue(variableString, propertyPath);
+ } else {
+ log.warn("Got a path query expression but content seems not to be JSON nor XML...");
+ variableValue = null;
+ }
+ }
+ } else if (variableValue.getClass().isArray()) {
+ if (propertyPath.matches(ARRAY_INDEX_REGEXP)) {
+ Matcher m = ARRAY_INDEX_PATTERN.matcher(propertyPath);
+ if (m.matches()) {
+ String arrayIndex = m.group(1);
+ Object[] variableValues = (Object[]) variableValue;
+ try {
+ variableValue = variableValues[Integer.parseInt(arrayIndex)];
+ } catch (ArrayIndexOutOfBoundsException ae) {
+ log.warn("Expression asked for " + arrayIndex + " but array is smaller (" + variableValues.length
+ + "). Returning null.");
+ variableValue = null;
+ }
+ }
+ }
+ } else if (Map.class.isAssignableFrom(variableValue.getClass())) {
+ if (propertyPath.matches(MAP_INDEX_REGEXP)) {
+ Matcher m = MAP_INDEX_PATTERN.matcher(propertyPath);
+ if (m.matches()) {
+ String mapKey = m.group(1);
+ Map variableValues = (Map) variableValue;
+ variableValue = variableValues.get(mapKey);
+ }
+ }
+ }
+ }
+
+ return String.valueOf(variableValue);
+ }
+
+ /**
+ * Fetch a property from an object. For example of you wanted to get the foo property on a bar object you would
+ * normally call {@code bar.getFoo()}.
+ * @param obj The object whose property you want to fetch
+ * @param property The property name
+ * @return The value of the property or null if it does not exist.
+ */
+ private static Object getProperty(Object obj, String property) {
+ Object result = null;
+
+ try {
+ String methodName = "get" + property.substring(0, 1).toUpperCase() + property.substring(1);
+ Class> clazz = obj.getClass();
+ Method method = clazz.getMethod(methodName);
+ result = method.invoke(obj);
+ } catch (Exception e) {
+ // Do nothing, we'll return the default value
+ log.warn(property + " property was requested on " + obj.getClass() + " but cannot find a valid getter", e);
+ }
+ return result;
+ }
+
+ /** Extract a value from JSON using a JSON Pointer expression. */
+ private static String getJsonPointerValue(String jsonText, String jsonPointerExp) {
+ // Parse json text ang get root node.
+ JsonNode rootNode;
+ try {
+ ObjectMapper mapper = new ObjectMapper();
+ rootNode = mapper.readTree(new StringReader(jsonText));
+ // Retrieve evaluated node within JSON tree.
+ JsonNode evaluatedNode = rootNode.at(jsonPointerExp);
+ // Return serialized array if array type node is referenced by JsonPointer, text value otherwise
+ return evaluatedNode.isArray() || evaluatedNode.isObject() ? mapper.writeValueAsString(evaluatedNode)
+ : evaluatedNode.asText();
+ } catch (Exception e) {
+ log.warn("Exception while parsing Json text", e);
+ return null;
+ }
+ }
+
+ /** Extract a value from XML using a XPath expression. */
+ private static String getXPathValue(String xmlText, String xPathExp) {
+ XPath xpath = XPathFactory.newInstance().newXPath();
+ try {
+ XPathExpression expression = xpath.compile(xPathExp);
+ return expression.evaluate(new InputSource(new StringReader(xmlText)));
+ } catch (XPathExpressionException e) {
+ log.warn("Exception while compiling/evaluating XPath", e);
+ return null;
+ }
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/AbstractRandomELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/AbstractRandomELFunction.java
new file mode 100644
index 000000000..680972ce6
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/AbstractRandomELFunction.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import java.security.SecureRandom;
+import java.util.Random;
+
+/**
+ * This is a base class for random data generator that holds a secure random generator.
+ * @author laurent
+ */
+public abstract class AbstractRandomELFunction implements ELFunction {
+
+ private static Random random = new SecureRandom();
+
+ /** Default protected constructor to hide the implicit one. */
+ protected AbstractRandomELFunction() {
+ }
+
+ /** Get a random generator. */
+ protected static Random getRandom() {
+ return random;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/ELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/ELFunction.java
new file mode 100644
index 000000000..04bde8031
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/ELFunction.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * This is a Expression Language function definition. It just can be evaluted.
+ * @author laurent
+ */
+public interface ELFunction {
+
+ /**
+ * Evaluate the function represented by the EL notation.
+ * @param evaluationContext The context of evaluation (contextualized info, cached one, ...)
+ * @param args The arguments of the function evaluation
+ * @return The result as a String fo this function evaluation.
+ */
+ String evaluate(EvaluationContext evaluationContext, String... args);
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/FakerELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/FakerELFunction.java
new file mode 100644
index 000000000..374e19711
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/FakerELFunction.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import net.datafaker.Faker;
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * This is a base class for function that are using Datafaker (see Datafaker).
+ * This base class provides a convenient method for retrieving or lazy loading a Faker that will be put into
+ * {@code EvaluationContext}.
+ * @author laurent
+ */
+public abstract class FakerELFunction implements ELFunction {
+
+ protected static final String FAKER_VARIABLE_NAME = "faker";
+
+ /**
+ * Retrieve a Faker from evaluation content. Lazy load it if not already present.
+ * @param evaluationContext The context to retrieve from or store within
+ * @return A Faker implementation ready to use.
+ */
+ protected Faker retrieveFaker(EvaluationContext evaluationContext) {
+ Faker faker;
+ Object fakerObject = evaluationContext.lookupVariable(FAKER_VARIABLE_NAME);
+ if (fakerObject instanceof Faker) {
+ faker = (Faker) fakerObject;
+ } else {
+ // Build a new Faker and store it into context for later fakers.
+ faker = new Faker();
+ evaluationContext.setVariable(FAKER_VARIABLE_NAME, faker);
+ }
+ return faker;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/NowELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/NowELFunction.java
new file mode 100644
index 000000000..48a34f252
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/NowELFunction.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import io.github.microcks.util.el.EvaluationContext;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+
+/**
+ * Implementation of ELFunction that generates a date representation corresponding to current time + an optional amount
+ * of time. String format and added time unit are specified using Java Date Format patterns.
+ * @author laurent
+ */
+public class NowELFunction implements ELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ SimpleDateFormat dateFormat = null;
+
+ if (args != null) {
+ switch (args.length) {
+ case 1:
+ dateFormat = new SimpleDateFormat(args[0]);
+ return dateFormat.format(Calendar.getInstance().getTime());
+ case 2:
+ Calendar now = Calendar.getInstance();
+ // 2nd argument is a delta with unit.
+ String unit = args[1].substring(args[1].length() - 1);
+ String amountStr = args[1].substring(0, args[1].length() - 1);
+
+ if (isInteger(amountStr)) {
+ int amount = Integer.parseInt(amountStr);
+ switch (unit) {
+ case "m":
+ now.add(Calendar.MINUTE, amount);
+ break;
+ case "H":
+ now.add(Calendar.HOUR, amount);
+ break;
+ case "d":
+ now.add(Calendar.DATE, amount);
+ break;
+ case "M":
+ now.add(Calendar.MONTH, amount);
+ break;
+ case "y":
+ now.add(Calendar.YEAR, amount);
+ break;
+ default:
+ break;
+ }
+ }
+ dateFormat = new SimpleDateFormat(args[0]);
+ return dateFormat.format(now.getTime());
+ default:
+ return String.valueOf(System.currentTimeMillis());
+ }
+ }
+ return String.valueOf(System.currentTimeMillis());
+ }
+
+ /** Check if given string is parsable in Integer without throwing exception. */
+ private static boolean isInteger(String strNum) {
+ if (strNum == null) {
+ return false;
+ }
+ try {
+ int d = Integer.parseInt(strNum);
+ } catch (NumberFormatException nfe) {
+ return false;
+ }
+ return true;
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/PutInContextELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/PutInContextELFunction.java
new file mode 100644
index 000000000..6868d0189
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/PutInContextELFunction.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * Implementation of ELFunction that puts a previous result into an evaluation context variable.
+ * @author laurent
+ */
+public class PutInContextELFunction implements ELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ if (args != null && args.length > 1) {
+ evaluationContext.setVariable(args[0], args[1]);
+ }
+ return "";
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomBooleanELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomBooleanELFunction.java
new file mode 100644
index 000000000..ada42e319
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomBooleanELFunction.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * Implementation of ELFunction that generates a random boolean.
+ * @author laurent
+ */
+public class RandomBooleanELFunction extends AbstractRandomELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ return String.valueOf(getRandom().nextBoolean());
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomCityELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomCityELFunction.java
new file mode 100644
index 000000000..328e753aa
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomCityELFunction.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import net.datafaker.Faker;
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * Implementation of ELFunction that generates a random city.
+ * @author laurent
+ */
+public class RandomCityELFunction extends FakerELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ Faker faker = retrieveFaker(evaluationContext);
+ return faker.address().cityName();
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomCountryCodeELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomCountryCodeELFunction.java
new file mode 100644
index 000000000..897729f3e
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomCountryCodeELFunction.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import net.datafaker.Faker;
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * Implementation of ELFunction that generates a random country code.
+ * @author laurent
+ */
+public class RandomCountryCodeELFunction extends FakerELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ Faker faker = retrieveFaker(evaluationContext);
+ return faker.address().countryCode();
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomCountryELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomCountryELFunction.java
new file mode 100644
index 000000000..42ec53512
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomCountryELFunction.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import net.datafaker.Faker;
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * Implementation of ELFunction that generates a random country.
+ * @author laurent
+ */
+public class RandomCountryELFunction extends FakerELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ Faker faker = retrieveFaker(evaluationContext);
+ return faker.address().country();
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomEmailELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomEmailELFunction.java
new file mode 100644
index 000000000..e94813674
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomEmailELFunction.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import net.datafaker.Faker;
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * Implementation of ELFunction that generates a random email.
+ * @author laurent
+ */
+public class RandomEmailELFunction extends FakerELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ Faker faker = retrieveFaker(evaluationContext);
+ return faker.internet().safeEmailAddress();
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomFirstNameELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomFirstNameELFunction.java
new file mode 100644
index 000000000..2cc863a59
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomFirstNameELFunction.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import net.datafaker.Faker;
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * Implementation of ELFunction that generates a random firstname.
+ * @author laurent
+ */
+public class RandomFirstNameELFunction extends FakerELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ Faker faker = retrieveFaker(evaluationContext);
+ return faker.name().firstName();
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomFullNameELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomFullNameELFunction.java
new file mode 100644
index 000000000..fdd8cfa69
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomFullNameELFunction.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import net.datafaker.Faker;
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * Implementation of ELFunction that generates a random fullname.
+ * @author laurent
+ */
+public class RandomFullNameELFunction extends FakerELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ Faker faker = retrieveFaker(evaluationContext);
+ return faker.name().fullName();
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomIntELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomIntELFunction.java
new file mode 100644
index 000000000..e21bc30c5
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomIntELFunction.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * This is an implementation of ELFunction that generates random integer values. When invoked with no arg a integer
+ * between Integer.MIN_VALUE and Integer.MAX_VALUE is generated. When invoked with one
+ * argument, a positive integer bounded by arg value is generated. When invoked with 2 arguments, an integer in
+ * designated intervfal is generated.
+ * @author laurent
+ */
+public class RandomIntELFunction extends AbstractRandomELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ if (args != null) {
+ switch (args.length) {
+ case 1:
+ int maxValue = Integer.MAX_VALUE;
+ try {
+ maxValue = Integer.parseInt(args[0]);
+ } catch (NumberFormatException nfe) {
+ // Ignore, we'll stick to integer max value.
+ }
+ return String.valueOf(getRandom().nextInt(maxValue));
+ case 2:
+ int minValue = 0;
+ maxValue = Integer.MAX_VALUE;
+ try {
+ minValue = Integer.parseInt(args[0]);
+ maxValue = Integer.parseInt(args[1]);
+ } catch (NumberFormatException nfe) {
+ // Ignore, we'll stick to the defaults.
+ }
+ return String.valueOf(getRandom().nextInt(maxValue - minValue) + minValue);
+ default:
+ return String.valueOf(getRandom().nextInt());
+ }
+ }
+ return String.valueOf(getRandom().nextInt());
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomLastNameELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomLastNameELFunction.java
new file mode 100644
index 000000000..c20cfe8db
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomLastNameELFunction.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import net.datafaker.Faker;
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * Implementation of ELFunction that generates a random lastname.
+ * @author laurent
+ */
+public class RandomLastNameELFunction extends FakerELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ Faker faker = retrieveFaker(evaluationContext);
+ return faker.name().lastName();
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomLatitudeELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomLatitudeELFunction.java
new file mode 100644
index 000000000..0cd3613a3
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomLatitudeELFunction.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import net.datafaker.Faker;
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * Implementation of ELFunction that generates a random latitude.
+ * @author laurent
+ */
+public class RandomLatitudeELFunction extends FakerELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ Faker faker = retrieveFaker(evaluationContext);
+ return faker.address().latitude();
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomLongitudeELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomLongitudeELFunction.java
new file mode 100644
index 000000000..cf6ac60c3
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomLongitudeELFunction.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import net.datafaker.Faker;
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * Implementation of ELFunction that generates a random latitude.
+ * @author laurent
+ */
+public class RandomLongitudeELFunction extends FakerELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ Faker faker = retrieveFaker(evaluationContext);
+ return faker.address().longitude();
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomNamePrefixELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomNamePrefixELFunction.java
new file mode 100644
index 000000000..7eb939372
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomNamePrefixELFunction.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import net.datafaker.Faker;
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * Implementation of ELFunction that generates a random name prefix.
+ * @author laurent
+ */
+public class RandomNamePrefixELFunction extends FakerELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ Faker faker = retrieveFaker(evaluationContext);
+ return faker.name().prefix();
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomNameSuffixELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomNameSuffixELFunction.java
new file mode 100644
index 000000000..2381dee81
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomNameSuffixELFunction.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import net.datafaker.Faker;
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * Implementation of ELFunction that generates a random name suffix.
+ * @author laurent
+ */
+public class RandomNameSuffixELFunction extends FakerELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ Faker faker = retrieveFaker(evaluationContext);
+ return faker.name().suffix();
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomPhoneNumberELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomPhoneNumberELFunction.java
new file mode 100644
index 000000000..102ca5076
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomPhoneNumberELFunction.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import net.datafaker.Faker;
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * Implementation of ELFunction that generates a random phone number.
+ * @author laurent
+ */
+public class RandomPhoneNumberELFunction extends FakerELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ Faker faker = retrieveFaker(evaluationContext);
+ return faker.phoneNumber().phoneNumber();
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomStreetAddressELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomStreetAddressELFunction.java
new file mode 100644
index 000000000..a742f88b8
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomStreetAddressELFunction.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import net.datafaker.Faker;
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * Implementation of ELFunction that generates a random street address.
+ * @author laurent
+ */
+public class RandomStreetAddressELFunction extends FakerELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ Faker faker = retrieveFaker(evaluationContext);
+ return faker.address().streetAddress();
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomStreetNameELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomStreetNameELFunction.java
new file mode 100644
index 000000000..616a704f5
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomStreetNameELFunction.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import net.datafaker.Faker;
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * Implementation of ELFunction that generates a random street name.
+ * @author laurent
+ */
+public class RandomStreetNameELFunction extends FakerELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ Faker faker = retrieveFaker(evaluationContext);
+ return faker.address().streetName();
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomStringELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomStringELFunction.java
new file mode 100644
index 000000000..4edd58f3b
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomStringELFunction.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import io.github.microcks.util.el.EvaluationContext;
+
+import java.util.Random;
+
+/**
+ * This is an implementation of ELFunction that generates random Alphanumeric string. You may specify string length as
+ * first argument. Default length is 32.
+ * @author laurent
+ */
+public class RandomStringELFunction extends AbstractRandomELFunction {
+
+ public static final int DEFAULT_LENGTH = 32;
+
+ private static final int LEFT_LIMIT = 48; // numeral '0'
+ private static final int RIGHT_LIMIT = 122; // letter 'z'
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ if (args != null && args.length == 1) {
+ int maxLength = DEFAULT_LENGTH;
+ try {
+ maxLength = Integer.parseInt(args[0]);
+ } catch (NumberFormatException nfe) {
+ // Ignore, we'll stick to the default.
+ }
+ return generateString(getRandom(), maxLength);
+ }
+ return generateString(getRandom(), DEFAULT_LENGTH);
+ }
+
+ private String generateString(Random random, int length) {
+ // See https://www.baeldung.com/java-random-string for reference.
+ return random.ints(LEFT_LIMIT, RIGHT_LIMIT + 1).filter(i -> (i <= 57 || i >= 65) && (i <= 90 || i >= 97))
+ .limit(length).collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append)
+ .toString();
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomValueELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomValueELFunction.java
new file mode 100644
index 000000000..81d804f83
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/RandomValueELFunction.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import io.github.microcks.util.el.EvaluationContext;
+
+/**
+ * Implementation of ELFunction that pick a value among random ones.
+ * @author laurent
+ */
+public class RandomValueELFunction extends AbstractRandomELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ if (args == null || args.length == 0) {
+ return "";
+ }
+ return args[getRandom().nextInt(args.length)];
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/UUIDELFunction.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/UUIDELFunction.java
new file mode 100644
index 000000000..fa6eea795
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/java/io/github/microcks/util/el/function/UUIDELFunction.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import io.github.microcks.util.el.EvaluationContext;
+
+import java.util.UUID;
+
+/**
+ * Implementation of ELFunction that generates a UUID compliant with RFC 4122 (see
+ * https://www.cryptosys.net/pki/uuid-rfc4122.html).
+ * @author laurent
+ */
+public class UUIDELFunction implements ELFunction {
+
+ @Override
+ public String evaluate(EvaluationContext evaluationContext, String... args) {
+ return UUID.randomUUID().toString();
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/resources/META-INF/native-image/io.github.microcks/microcks-el/reflect-config.json b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/resources/META-INF/native-image/io.github.microcks/microcks-el/reflect-config.json
new file mode 100644
index 000000000..942202aa5
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/main/resources/META-INF/native-image/io.github.microcks/microcks-el/reflect-config.json
@@ -0,0 +1,136 @@
+[
+ {
+ "name": "io.github.microcks.util.el.EvaluableRequest",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+ {
+ "name": "io.github.microcks.util.el.function.NowELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+ {
+ "name": "io.github.microcks.util.el.function.PutInContextELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+ {
+ "name": "io.github.microcks.util.el.function.RandomBooleanELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+ {
+ "name": "io.github.microcks.util.el.function.RandomCityELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+ {
+ "name": "io.github.microcks.util.el.function.RandomCountryCodeELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+ {
+ "name": "io.github.microcks.util.el.function.RandomCountryELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+ {
+ "name": "io.github.microcks.util.el.function.RandomEmailELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+ {
+ "name": "io.github.microcks.util.el.function.RandomFirstNameELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+
+ {
+ "name": "io.github.microcks.util.el.function.RandomFullNameELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+
+ {
+ "name": "io.github.microcks.util.el.function.RandomIntELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+ {
+ "name": "io.github.microcks.util.el.function.RandomLastNameELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+ {
+ "name": "io.github.microcks.util.el.function.RandomLatitudeELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+ {
+ "name": "io.github.microcks.util.el.function.RandomLongitudeELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+ {
+ "name": "io.github.microcks.util.el.function.RandomNamePrefixELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+ {
+ "name": "io.github.microcks.util.el.function.RandomNameSuffixELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+ {
+ "name": "io.github.microcks.util.el.function.RandomPhoneNumberELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+ {
+ "name": "io.github.microcks.util.el.function.RandomStreetAddressELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+ {
+ "name": "io.github.microcks.util.el.function.RandomStreetNameELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+ {
+ "name": "io.github.microcks.util.el.function.RandomStringELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+ {
+ "name": "io.github.microcks.util.el.function.RandomValueELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true, "allDeclaredMethods": true
+ },
+ {
+ "name": "io.github.microcks.util.el.function.UUIDELFunction",
+ "queryAllDeclaredMethods": true, "queryAllDeclaredConstructors": true, "queryAllDeclaredFields": true,
+ "queryAllPublicMethods": true, "queryAllPublicConstructors": true, "queryAllPublicFields": true,
+ "allDeclaredClasses": true, "allDeclaredConstructors": true
+ }
+]
\ No newline at end of file
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/EvaluationContextTest.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/EvaluationContextTest.java
new file mode 100644
index 000000000..0b19db604
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/EvaluationContextTest.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el;
+
+import io.github.microcks.domain.Request;
+import io.github.microcks.util.el.function.ELFunction;
+import io.github.microcks.util.el.function.NowELFunction;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+/**
+ * This is a test case for EvaluationContext class.
+ * @author laurent
+ */
+class EvaluationContextTest {
+
+ @Test
+ void testVariableRegistrationAndLookup() {
+ // Create a context, register and retrieve a variable.
+ EvaluationContext context = new EvaluationContext();
+ context.setVariable("request", new Request());
+
+ Object requestObj = context.lookupVariable("request");
+ assertTrue(requestObj instanceof Request);
+ }
+
+ @Test
+ void testFunctionRegistrationAndLookup() throws Exception {
+ // Create a context, register and retrieve a function.
+ EvaluationContext context = new EvaluationContext();
+ context.registerFunction("now", NowELFunction.class);
+
+ Class functionClazz = context.lookupFunction("now");
+ ELFunction function = functionClazz.newInstance();
+
+ assertEquals(NowELFunction.class, function.getClass());
+
+ // Test failure case.
+ functionClazz = context.lookupFunction("never");
+ assertNull(functionClazz);
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/ExpressionParserTest.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/ExpressionParserTest.java
new file mode 100644
index 000000000..cd26476e3
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/ExpressionParserTest.java
@@ -0,0 +1,170 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el;
+
+import io.github.microcks.util.el.function.NowELFunction;
+import io.github.microcks.util.el.function.PutInContextELFunction;
+import io.github.microcks.util.el.function.RandomBooleanELFunction;
+import io.github.microcks.util.el.function.UUIDELFunction;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
+
+/**
+ * A TestCase for ExpressionParser class.
+ * @author laurent
+ */
+class ExpressionParserTest {
+
+ @Test
+ void testParseExpressions() {
+ String template = "Hello {{ request.body/name}} it's {{now() }}";
+
+ // Build a suitable context.
+ EvaluationContext context = new EvaluationContext();
+ context.registerFunction("now", NowELFunction.class);
+ context.setVariable("request", new EvaluableRequest("{'name': 'Laurent'}", null));
+
+ Expression[] expressions = ExpressionParser.parseExpressions(template, context, "{{", "}}");
+
+ assertEquals(4, expressions.length);
+ assertInstanceOf(LiteralExpression.class, expressions[0]);
+ assertInstanceOf(VariableReferenceExpression.class, expressions[1]);
+ assertInstanceOf(LiteralExpression.class, expressions[2]);
+ assertInstanceOf(FunctionExpression.class, expressions[3]);
+
+ assertEquals("Hello ", ((LiteralExpression) expressions[0]).getValue(context));
+ assertEquals(" it's ", ((LiteralExpression) expressions[2]).getValue(context));
+ }
+
+ @Test
+ void testRedirectParseExpressions() {
+ String template = "Hello {{ guid() > put(id) }} world! This is my {{ id }}";
+
+ // Build a suitable context.
+ EvaluationContext context = new EvaluationContext();
+ context.registerFunction("guid", UUIDELFunction.class);
+ context.registerFunction("put", PutInContextELFunction.class);
+
+ Expression[] expressions = ExpressionParser.parseExpressions(template, context, "{{", "}}");
+
+ assertEquals(4, expressions.length);
+ assertInstanceOf(LiteralExpression.class, expressions[0]);
+ assertInstanceOf(RedirectExpression.class, expressions[1]);
+ assertInstanceOf(LiteralExpression.class, expressions[2]);
+ assertInstanceOf(VariableReferenceExpression.class, expressions[3]);
+
+ String guidValue = expressions[1].getValue(context);
+ String contextValue = expressions[3].getValue(context);
+ assertEquals(guidValue, contextValue);
+ }
+
+ @Test
+ void testFallbackParseExpression() {
+ String template = "Bar value: {{ request.body/bar || randomBoolean() }}";
+
+ // Build a suitable context.
+ EvaluationContext context = new EvaluationContext();
+ context.registerFunction("randomBoolean", RandomBooleanELFunction.class);
+ context.setVariable("request", new EvaluableRequest("{\"foo\": \"Foo\"}", null));
+
+ Expression[] expressions = ExpressionParser.parseExpressions(template, context, "{{", "}}");
+
+ assertEquals(2, expressions.length);
+ assertInstanceOf(LiteralExpression.class, expressions[0]);
+ assertInstanceOf(FallbackExpression.class, expressions[1]);
+
+ assertEquals("Bar value: ", expressions[0].getValue(context));
+ String barValue = expressions[1].getValue(context);
+ assertTrue("true".equals(barValue) || "false".equals(barValue));
+ }
+
+ @Test
+ void testXpathExpressionWithNestedFunction() {
+ String template = "Hello {{ request.body//*[local-name() = 'name'] }} it's {{ now() }}";
+
+ // Build a suitable context.
+ EvaluationContext context = new EvaluationContext();
+ context.registerFunction("now", NowELFunction.class);
+ context.setVariable("request", new EvaluableRequest(
+ "Laurent", null));
+
+ Expression[] expressions = ExpressionParser.parseExpressions(template, context, "{{", "}}");
+
+ assertEquals(4, expressions.length);
+ assertTrue(expressions[0] instanceof LiteralExpression);
+ assertTrue(expressions[1] instanceof VariableReferenceExpression);
+ assertTrue(expressions[2] instanceof LiteralExpression);
+ assertTrue(expressions[3] instanceof FunctionExpression);
+
+ assertEquals("Laurent", ((VariableReferenceExpression) expressions[1]).getValue(context));
+ }
+
+ @Test
+ void testXpathAttributeExpressionWithNestedFunction() {
+ String template = "Hello {{ request.body/request/name/@firstname }} it's {{ now() }}";
+
+ // Build a suitable context.
+ EvaluationContext context = new EvaluationContext();
+ context.registerFunction("now", NowELFunction.class);
+ context.setVariable("request", new EvaluableRequest("", null));
+
+ Expression[] expressions = ExpressionParser.parseExpressions(template, context, "{{", "}}");
+
+ assertEquals(4, expressions.length);
+ assertTrue(expressions[0] instanceof LiteralExpression);
+ assertTrue(expressions[1] instanceof VariableReferenceExpression);
+ assertTrue(expressions[2] instanceof LiteralExpression);
+ assertTrue(expressions[3] instanceof FunctionExpression);
+
+ assertEquals("Laurent", ((VariableReferenceExpression) expressions[1]).getValue(context));
+ }
+
+ @Test
+ void testParseExpressionWithEscapeCharacter() {
+ String template1 = "id : {{{uuid()}}}";
+ String template2 = "name : #{{request.body/name}}#";
+
+ // Build a suitable context.
+ EvaluationContext context = new EvaluationContext();
+ context.registerFunction("uuid", UUIDELFunction.class);
+ context.setVariable("request", new EvaluableRequest("{\"name\": \"Laurent\"}", null));
+ Expression[] expressions;
+
+ //Test for template1
+ expressions = ExpressionParser.parseExpressions(template1, context, "{{", "}}");
+ assertEquals(4, expressions.length);
+ assertInstanceOf(LiteralExpression.class, expressions[0]);
+ assertInstanceOf(LiteralExpression.class, expressions[1]);
+ assertInstanceOf(FunctionExpression.class, expressions[2]);
+ assertInstanceOf(LiteralExpression.class, expressions[3]);
+
+ assertEquals("{", ((LiteralExpression) expressions[1]).getValue(context));
+ assertEquals("}", ((LiteralExpression) expressions[3]).getValue(context));
+
+ //Test for template2
+ expressions = ExpressionParser.parseExpressions(template2, context, "{{", "}}");
+ assertEquals(3, expressions.length);
+ assertInstanceOf(LiteralExpression.class, expressions[0]);
+ assertInstanceOf(VariableReferenceExpression.class, expressions[1]);
+ assertInstanceOf(LiteralExpression.class, expressions[2]);
+
+ assertEquals("name : #", ((LiteralExpression) expressions[0]).getValue(context));
+ assertEquals("#", ((LiteralExpression) expressions[2]).getValue(context));
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/FallbackExpressionTest.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/FallbackExpressionTest.java
new file mode 100644
index 000000000..86d0c4947
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/FallbackExpressionTest.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.github.microcks.util.el;
+
+import io.github.microcks.util.el.function.RandomBooleanELFunction;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+/**
+ * This is a test case for FallbackExpression class.
+ * @author laurent
+ */
+class FallbackExpressionTest {
+
+ @Test
+ void testLiteralFallback() {
+ Expression[] expressions = new Expression[] { new LiteralExpression("hello"), new LiteralExpression("world") };
+
+ FallbackExpression exp = new FallbackExpression(expressions);
+ String result = exp.getValue(new EvaluationContext());
+ assertEquals("hello", result);
+ }
+
+ @Test
+ void testVariableReferenceFallbackToRandom() {
+ // First case: the first expression is not null or empty.
+ String jsonString = """
+ {
+ "foo": "Foo",
+ "bar": "Bar"
+ }
+ """;
+ EvaluableRequest request = new EvaluableRequest(jsonString, null);
+
+ Expression[] expressions = new Expression[] { new VariableReferenceExpression(request, "body/bar"),
+ new FunctionExpression(new RandomBooleanELFunction(), new String[] {}) };
+
+ FallbackExpression exp = new FallbackExpression(expressions);
+ String result = exp.getValue(new EvaluationContext());
+ assertEquals("Bar", result);
+
+ // Second case: the first expression is null or empty (eg: no 'bar' field in JSON).
+ jsonString = """
+ {
+ "foo": "Foo"
+ }
+ """;
+ request = new EvaluableRequest(jsonString, null);
+
+ expressions = new Expression[] { new VariableReferenceExpression(request, "body/bar"),
+ new FunctionExpression(new RandomBooleanELFunction(), new String[] {}) };
+
+ exp = new FallbackExpression(expressions);
+ result = exp.getValue(new EvaluationContext());
+ assertTrue(result.equals("true") || result.equals("false"));
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/RedirectExpressionTest.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/RedirectExpressionTest.java
new file mode 100644
index 000000000..e7509080c
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/RedirectExpressionTest.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el;
+
+import io.github.microcks.util.el.function.PutInContextELFunction;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+/**
+ * This is a test case for RedirectExpression class.
+ * @author laurent
+ */
+class RedirectExpressionTest {
+
+ @Test
+ void testLiteralRedirect() {
+ Expression[] expressions = new Expression[] { new LiteralExpression("hello"), new LiteralExpression("world") };
+
+ RedirectExpression exp = new RedirectExpression(expressions);
+ String result = exp.getValue(new EvaluationContext());
+ assertEquals("hello", result);
+ }
+
+ @Test
+ void testLiteralRedirectToContext() {
+ EvaluationContext context = new EvaluationContext();
+
+ Expression[] expressions = new Expression[] { new LiteralExpression("hello"),
+ new FunctionExpression(new PutInContextELFunction(), new String[] { "greeting" }) };
+
+ RedirectExpression exp = new RedirectExpression(expressions);
+ String result = exp.getValue(context);
+ assertEquals("hello", result);
+ assertEquals("hello", context.lookupVariable("greeting"));
+ }
+
+ @Test
+ void testLiteralRedirectToMultiContext() {
+ EvaluationContext context = new EvaluationContext();
+
+ Expression[] expressions = new Expression[] { new LiteralExpression("hello"),
+ new FunctionExpression(new PutInContextELFunction(), new String[] { "greeting1" }),
+ new FunctionExpression(new PutInContextELFunction(), new String[] { "greeting2" }) };
+
+ RedirectExpression exp = new RedirectExpression(expressions);
+ String result = exp.getValue(context);
+ assertEquals("hello", result);
+ assertEquals("hello", context.lookupVariable("greeting1"));
+ assertEquals("hello", context.lookupVariable("greeting2"));
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/TemplateEngineTest.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/TemplateEngineTest.java
new file mode 100644
index 000000000..3ee32109c
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/TemplateEngineTest.java
@@ -0,0 +1,128 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el;
+
+import java.util.Calendar;
+import java.util.Map;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+/**
+ * This is a test case for TemplateEngine class.
+ * @author laurent
+ */
+class TemplateEngineTest {
+
+ @Test
+ void testSimpleTemplate() {
+ // Prepare a string representing now().
+ Calendar currentDate = Calendar.getInstance();// Assert formatting.
+ int day = currentDate.get(Calendar.DAY_OF_MONTH);
+ int month = currentDate.get(Calendar.MONTH);
+ int year = currentDate.get(Calendar.YEAR);
+ String dateString = (day < 10 ? "0" + day : day) + "/" + (++month < 10 ? "0" + month : month) + "/" + year;
+
+ // Execute simple template calling now() and request.body function.
+ EvaluableRequest request = new EvaluableRequest("hello world!", new String[] { "name", "Laurent" });
+
+ TemplateEngine engine = TemplateEngineFactory.getTemplateEngine();
+ engine.getContext().setVariable("request", request);
+
+ String result = engine.getValue("Today is {{ now(dd/MM/yyyy) }} and {{ request.body }}");
+
+ assertEquals("Today is " + dateString + " and hello world!", result);
+ }
+
+ @Test
+ void testContextlessTemplate() {
+ String template = "{\"signedAt\": \"{{ now() }}\", \"fullName\": \"Laurent Broudoux\", \"email\": \"laurent@microcks.io\", \"age\": {{ randomInt(20, 99) }}} \n";
+
+ TemplateEngine engine = TemplateEngineFactory.getTemplateEngine();
+
+ String content = null;
+ try {
+ content = engine.getValue(template);
+ } catch (Throwable t) {
+ fail("Contextless template should not fail.");
+ }
+ assertTrue(content.startsWith("{\"signedAt\": \"1"));
+ }
+
+ @Test
+ void testPostmanNotationCompatibility() {
+ String template = "{\"signedAt\": \"{{ now() }}\", \"fullName\": \"{{ randomFullName() }}\", \"email\": \"{{ randomEmail() }}\", \"age\": {{ randomInt(20, 99) }} } \n";
+ String postmanTemplate = "{\"signedAt\": \"{{ $timestamp }}\", \"fullName\": \"{{ $randomFullName }}\", \"email\": \"{{ $randomEmail }}\", \"age\": {{ $randomInt }} } \n";
+
+ TemplateEngine engine = TemplateEngineFactory.getTemplateEngine();
+
+ String content = null;
+ String postmanContent = null;
+ try {
+ content = engine.getValue(template);
+ postmanContent = engine.getValue(postmanTemplate);
+ } catch (Throwable t) {
+ fail("Contextless template should not fail.");
+ }
+ assertTrue(content.startsWith("{\"signedAt\": \"1"));
+ assertTrue(postmanContent.startsWith("{\"signedAt\": \"1"));
+ }
+
+ @Test
+ void testXMLWithAttributeTemplate() {
+ // Execute simple template calling now() and request.body function.
+ EvaluableRequest request = new EvaluableRequest("", null);
+
+ TemplateEngine engine = TemplateEngineFactory.getTemplateEngine();
+ engine.getContext().setVariable("request", request);
+
+ String result = engine.getValue("Hello {{request.body/request/name/@firstname}}");
+
+ assertEquals("Hello Laurent", result);
+ }
+
+ @Test
+ void testXMLWithNSAndAttributeTemplate() {
+ // Execute simple template calling now() and request.body function.
+ EvaluableRequest request = new EvaluableRequest(
+ "",
+ null);
+
+ TemplateEngine engine = TemplateEngineFactory.getTemplateEngine();
+ engine.getContext().setVariable("request", request);
+
+ String result = engine
+ .getValue("Hello {{request.body//*[local-name() = 'name']/firstname/@value}}");
+
+ assertEquals("Hello Laurent", result);
+ }
+
+ @Test
+ void testRequestParams() {
+ EvaluableRequest request = new EvaluableRequest("", null);
+ Map params = Map.of("id", "8", "account-name", "test");
+ request.setParams(params);
+
+ TemplateEngine engine = TemplateEngineFactory.getTemplateEngine();
+ engine.getContext().setVariable("request", request);
+
+ String result = engine
+ .getValue("{ \"id\": \"{{request.params[id]}}\", \"accountName\": \"{{request.params[account-name]}}\" }");
+
+ assertEquals("{ \"id\": \"8\", \"accountName\": \"test\" }", result);
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/VariableReferenceExpressionTest.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/VariableReferenceExpressionTest.java
new file mode 100644
index 000000000..bd74bd3dc
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/VariableReferenceExpressionTest.java
@@ -0,0 +1,159 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+/**
+ * This is a test case for VariableReferenceExpression class.
+ * @author laurent
+ */
+class VariableReferenceExpressionTest {
+
+ @Test
+ void testStringValue() {
+ EvaluableRequest request = new EvaluableRequest("hello world", null);
+
+ // Create new expression evaluating simple string value.
+ VariableReferenceExpression exp = new VariableReferenceExpression(request, "body");
+ String result = exp.getValue(new EvaluationContext());
+ assertEquals("hello world", result);
+ }
+
+ @Test
+ void testJSONPointerValue() {
+ String jsonString = "{\n" + " \"library\": \"My Personal Library\",\n" + " \"books\": [\n"
+ + " { \"title\":\"Title 1\", \"author\":\"Jane Doe\" },\n"
+ + " { \"title\":\"Title 2\", \"author\":\"John Doe\" }\n" + " ]\n" + "}";
+ EvaluableRequest request = new EvaluableRequest(jsonString, null);
+
+ // Create new expression evaluating JSON Pointer path.
+ VariableReferenceExpression exp = new VariableReferenceExpression(request, "body/books/1/author");
+ String result = exp.getValue(new EvaluationContext());
+ assertEquals("John Doe", result);
+
+ // Test extraction of Array by JSON Pointer path
+ VariableReferenceExpression expArray = new VariableReferenceExpression(request, "body/books");
+ String resultArray = expArray.getValue(new EvaluationContext());
+ assertEquals("[{\"title\":\"Title 1\",\"author\":\"Jane Doe\"},{\"title\":\"Title 2\",\"author\":\"John Doe\"}]",
+ resultArray);
+
+ // Test extraction of Object by JSON Pointer path
+ VariableReferenceExpression expObj = new VariableReferenceExpression(request, "body/books/1");
+ String resultObj = expObj.getValue(new EvaluationContext());
+ assertEquals("{\"title\":\"Title 2\",\"author\":\"John Doe\"}", resultObj);
+ }
+
+ @Test
+ void testJSONPointerValueInArray() {
+ String jsonString = "[{\"foo\":{\"bar\":111222},\"quantity\":1}]";
+ EvaluableRequest request = new EvaluableRequest(jsonString, null);
+
+ // Create new expression evaluating JSON Pointer path.
+ VariableReferenceExpression exp = new VariableReferenceExpression(request, "body/0/quantity");
+ String result = exp.getValue(new EvaluationContext());
+ assertEquals("1", result);
+
+ // Test with a nested expression
+ exp = new VariableReferenceExpression(request, "body/0/foo/bar");
+ result = exp.getValue(new EvaluationContext());
+ assertEquals("111222", result);
+ }
+
+ @Test
+ void testXPathValue() {
+ String xmlString = "\n" + " My Personal Library\n" + " \n"
+ + " Title 1Jane Doe\n"
+ + " Title 2John Doe\n" + " \n" + "";
+ EvaluableRequest request = new EvaluableRequest(xmlString, null);
+
+ // Create new expression evaluating XML XPath.
+ VariableReferenceExpression exp = new VariableReferenceExpression(request, "body/library/books/book[1]/author");
+ String result = exp.getValue(new EvaluationContext());
+ assertEquals("Jane Doe", result);
+ }
+
+ @Test
+ void testXPathWithNamespaceValue() {
+ String xmlString = "\n"
+ + " My Personal Library\n" + " \n"
+ + " Title 1Jane Doe\n"
+ + " Title 2John Doe\n" + " \n"
+ + "";
+ EvaluableRequest request = new EvaluableRequest(xmlString, null);
+
+ // Create new expression evaluating XML XPath.
+ VariableReferenceExpression exp = new VariableReferenceExpression(request, "body//*[local-name() = 'name']");
+ String result = exp.getValue(new EvaluationContext());
+ assertEquals("My Personal Library", result);
+ }
+
+ @Test
+ void testArrayValues() {
+ EvaluableRequest request = new EvaluableRequest(null, new String[] { "one", "two" });
+
+ // Create new expression evaluating array value.
+ VariableReferenceExpression exp = new VariableReferenceExpression(request, "path[0]");
+ String result = exp.getValue(new EvaluationContext());
+ assertEquals("one", result);
+
+ // Change array index.
+ exp.setPathExpression("path[1]");
+ result = exp.getValue(new EvaluationContext());
+ assertEquals("two", result);
+
+ // Test with incorrect index.
+ exp.setPathExpression("path[2]");
+ result = exp.getValue(new EvaluationContext());
+ assertEquals("null", result);
+ }
+
+ @Test
+ void testMapValues() {
+ EvaluableRequest request = new EvaluableRequest(null, null);
+ Map headers = new HashMap<>();
+ headers.put("key", "value");
+ headers.put("hello", "world");
+ headers.put("account_-name", "test");
+ headers.put("account.name", "test");
+ request.setHeaders(headers);
+
+ // Create new expression evaluating map value.
+ VariableReferenceExpression exp = new VariableReferenceExpression(request, "headers[hello]");
+ String result = exp.getValue(new EvaluationContext());
+ assertEquals("world", result);
+
+ // Test with key having special characters.
+ exp.setPathExpression("headers[account_-name]");
+ result = exp.getValue(new EvaluationContext());
+ assertEquals("test", result);
+
+ // Test with incorrect key.
+ exp.setPathExpression("headers[microcks]");
+ result = exp.getValue(new EvaluationContext());
+ assertEquals("null", result);
+
+ // Test with key having dot character.
+ exp.setPathExpression("headers[account.name]");
+ result = exp.getValue(new EvaluationContext());
+ assertEquals("test", result);
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/function/NowELFunctionTest.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/function/NowELFunctionTest.java
new file mode 100644
index 000000000..ce581b2bf
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/function/NowELFunctionTest.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+/**
+ * This is a test case for NowELFunction class.
+ * @author laurent
+ */
+class NowELFunctionTest {
+
+ @Test
+ void testSimpleEvaluation() {
+ long before = System.currentTimeMillis();
+
+ // Compute evaluation.
+ NowELFunction function = new NowELFunction();
+ String result = function.evaluate(null);
+ long resultLong = Long.parseLong(result);
+
+ // Get new timestamp and compare.
+ long after = System.currentTimeMillis();
+ assertTrue(before <= resultLong);
+ assertTrue(after >= resultLong);
+ }
+
+ @Test
+ void testPatternEvaluation() {
+ Calendar currentDate = Calendar.getInstance();
+
+ // Compute evaluation.
+ NowELFunction function = new NowELFunction();
+ String result = function.evaluate(null, "dd/MM/yyyy HH:mm:ss");
+
+ // Assert formatting.
+ int day = currentDate.get(Calendar.DAY_OF_MONTH);
+ int month = currentDate.get(Calendar.MONTH);
+ int year = currentDate.get(Calendar.YEAR);
+ String dateString = (day < 10 ? "0" + day : day) + "/" + (++month < 10 ? "0" + month : month) + "/" + year;
+
+ assertTrue(result.startsWith(dateString));
+ }
+
+ @Test
+ void testPatternDeltaEvaluation() {
+ Calendar currentDate = Calendar.getInstance();
+
+ // Compute evaluation.
+ NowELFunction function = new NowELFunction();
+ String result = function.evaluate(null, "dd/MM/yyyy HH:mm:ss", "1d");
+
+ // Assert formatting.
+ currentDate.add(Calendar.DAY_OF_YEAR, 1);
+ SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
+ String dateString = dateFormat.format(currentDate.getTime());
+
+ assertTrue(result.startsWith(dateString.split(" ")[0]));
+
+ // Now add 1 month.
+ result = function.evaluate(null, "dd/MM/yyyy HH:mm:ss", "1M");
+ currentDate.add(Calendar.DAY_OF_YEAR, -1);
+ currentDate.add(Calendar.MONTH, 1);
+ dateString = dateFormat.format(currentDate.getTime());
+ assertTrue(result.startsWith(dateString.split(" ")[0]));
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/function/RandomFakerELFunctionTest.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/function/RandomFakerELFunctionTest.java
new file mode 100644
index 000000000..1dba69e5b
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/function/RandomFakerELFunctionTest.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import io.github.microcks.util.el.EvaluationContext;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+/**
+ * This is a Test case for Random functions based on Faker.
+ * @author laurent
+ */
+class RandomFakerELFunctionTest {
+
+ @Test
+ void testNameEvaluations() {
+ EvaluationContext context = new EvaluationContext();
+ // Test simple evaluations.
+ RandomFirstNameELFunction function = new RandomFirstNameELFunction();
+ assertNotNull(function.evaluate(context));
+
+ RandomLastNameELFunction lFunction = new RandomLastNameELFunction();
+ assertNotNull(lFunction.evaluate(context));
+
+ RandomFullNameELFunction fnFunction = new RandomFullNameELFunction();
+ assertNotNull(fnFunction.evaluate(context));
+
+ RandomNamePrefixELFunction npFunction = new RandomNamePrefixELFunction();
+ assertNotNull(npFunction.evaluate(context));
+
+ RandomNameSuffixELFunction nsFunction = new RandomNameSuffixELFunction();
+ assertNotNull(nsFunction.evaluate(context));
+ }
+
+ @Test
+ void testAddressEvaluations() {
+ EvaluationContext context = new EvaluationContext();
+ // Test simple evaluations.
+ RandomCityELFunction cFunction = new RandomCityELFunction();
+ assertNotNull(cFunction.evaluate(context));
+
+ RandomCountryELFunction coFunction = new RandomCountryELFunction();
+ assertNotNull(coFunction.evaluate(context));
+
+ RandomStreetNameELFunction snFunction = new RandomStreetNameELFunction();
+ assertNotNull(snFunction.evaluate(context));
+
+ RandomStreetAddressELFunction saFunction = new RandomStreetAddressELFunction();
+ assertNotNull(saFunction.evaluate(context));
+
+ RandomPhoneNumberELFunction pFunction = new RandomPhoneNumberELFunction();
+ assertNotNull(pFunction.evaluate(context));
+
+ RandomLatitudeELFunction laFunction = new RandomLatitudeELFunction();
+ assertNotNull(laFunction.evaluate(context));
+
+ RandomLongitudeELFunction loFunction = new RandomLongitudeELFunction();
+ assertNotNull(loFunction.evaluate(context));
+ }
+
+ @Test
+ void testInternetEvaluations() {
+ EvaluationContext context = new EvaluationContext();
+ // Test simple evaluations.
+ RandomEmailELFunction eFunction = new RandomEmailELFunction();
+ assertNotNull(eFunction.evaluate(context));
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/function/RandomIntELFunctionTest.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/function/RandomIntELFunctionTest.java
new file mode 100644
index 000000000..3d5544c2b
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/function/RandomIntELFunctionTest.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+/**
+ * This is a test case for RandomIntELFunction class.
+ * @author laurent
+ */
+class RandomIntELFunctionTest {
+
+ @Test
+ void testSimpleEvaluation() {
+ // Compute evaluation.
+ RandomIntELFunction function = new RandomIntELFunction();
+ String randomIntString = function.evaluate(null);
+
+ int randomInt = Integer.parseInt(randomIntString);
+ assertTrue(randomInt >= Integer.MIN_VALUE);
+ assertTrue(randomInt <= Integer.MAX_VALUE);
+ }
+
+ @Test
+ void testBoundedEvaluation() {
+ // Compute evaluation.
+ RandomIntELFunction function = new RandomIntELFunction();
+ String randomIntString = function.evaluate(null, "50");
+
+ int randomInt = Integer.parseInt(randomIntString);
+ assertTrue(randomInt >= 0);
+ assertTrue(randomInt <= 50);
+ }
+
+ @Test
+ void testIntervalEvaluation() {
+ // Compute evaluation.
+ RandomIntELFunction function = new RandomIntELFunction();
+ String randomIntString = function.evaluate(null, "25", "50");
+
+ int randomInt = Integer.parseInt(randomIntString);
+ assertTrue(randomInt >= 25);
+ assertTrue(randomInt <= 50);
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/function/RandomStringELFunctionTest.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/function/RandomStringELFunctionTest.java
new file mode 100644
index 000000000..0b3c8d755
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/function/RandomStringELFunctionTest.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+/**
+ * This is a test case for RandomStringELFunction class.
+ * @author laurent
+ */
+class RandomStringELFunctionTest {
+
+ @Test
+ void testSimpleEvaluation() {
+ // Compute evaluation.
+ RandomStringELFunction function = new RandomStringELFunction();
+ String result = function.evaluate(null);
+
+ assertEquals(RandomStringELFunction.DEFAULT_LENGTH, result.length());
+ }
+
+ @Test
+ void testCustomSizeEvaluation() {
+ // Compute evaluation.
+ RandomStringELFunction function = new RandomStringELFunction();
+ String result = function.evaluate(null, "64");
+
+ assertEquals(64, result.length());
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/function/RandomValueELFunctionTest.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/function/RandomValueELFunctionTest.java
new file mode 100644
index 000000000..f373a51f4
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/function/RandomValueELFunctionTest.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import java.util.List;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+/**
+ * This is a test case for RandomValueEFFunction class.
+ * @author laurent
+ */
+class RandomValueELFunctionTest {
+
+ @Test
+ void testSimpleEvaluation() {
+ List values = List.of("one", "two", "three");
+
+ // Compute evaluation.
+ RandomValueELFunction function = new RandomValueELFunction();
+ String result = function.evaluate(null);
+ assertEquals("", result);
+
+ result = function.evaluate(null, "one", "two", "three");
+ assertTrue(values.contains(result));
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/function/UUIDELFunctionTest.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/function/UUIDELFunctionTest.java
new file mode 100644
index 000000000..ee37c9919
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util-el/src/test/java/io/github/microcks/util/el/function/UUIDELFunctionTest.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util.el.function;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+/**
+ * This is a test case for UUIDELFunction class.
+ * @author laurent
+ */
+class UUIDELFunctionTest {
+
+ @Test
+ void testSimpleEvaluation() {
+ // Compute uuid.
+ UUIDELFunction function = new UUIDELFunction();
+ String uuid = function.evaluate(null);
+
+ // Check its RFC 4122 compliant.
+ assertEquals(36, uuid.length());
+ assertEquals(8, uuid.indexOf('-'));
+ assertEquals(23, uuid.lastIndexOf('-'));
+ assertEquals("-", uuid.substring(13, 14));
+ assertEquals("4", uuid.substring(14, 15));
+ assertEquals("-", uuid.substring(18, 19));
+ }
+}
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util/pom.xml b/jdk_21_maven/cs/rest-gui/microcks/commons/util/pom.xml
new file mode 100644
index 000000000..da94382e6
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util/pom.xml
@@ -0,0 +1,128 @@
+
+
+
+
+
+ microcks
+ io.github.microcks
+ 1.12.2-SNAPSHOT
+ ../../pom.xml
+
+ 4.0.0
+
+ Microcks Util
+ microcks-util
+
+
+ UTF-8
+ ../..
+ 21
+ 5.10.2
+ 2.17.3
+ 1.5.5
+ 2.2
+ 1.12.0
+ 5.7.0
+
+
+
+
+ org.slf4j
+ slf4j-api
+
+
+
+
+ org.yaml
+ snakeyaml
+ ${snakeyaml.version}
+
+
+
+ com.fasterxml.jackson.dataformat
+ jackson-dataformat-yaml
+ ${jackson.version}
+
+
+
+ org.yaml
+ snakeyaml
+
+
+
+
+
+ com.networknt
+ json-schema-validator
+ ${json-schema-validator.version}
+
+
+
+ org.apache.avro
+ avro
+ ${avro.version}
+
+
+
+ com.graphql-java
+ graphql-java
+
+
+
+
+ io.github.microcks
+ microcks-model
+ ${project.version}
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter
+ ${junit.version}
+ test
+
+
+ commons-io
+ commons-io
+ 2.16.1
+ test
+
+
+ org.mockito
+ mockito-core
+ ${mockito.version}
+ test
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.1
+
+ ${java.version}
+ ${java.version}
+ ${project.build.sourceEncoding}
+ -Xlint:deprecation
+ -Xlint:unchecked
+
+
+
+
+
diff --git a/jdk_21_maven/cs/rest-gui/microcks/commons/util/src/main/java/io/github/microcks/util/AvroUtil.java b/jdk_21_maven/cs/rest-gui/microcks/commons/util/src/main/java/io/github/microcks/util/AvroUtil.java
new file mode 100644
index 000000000..69ad1d16b
--- /dev/null
+++ b/jdk_21_maven/cs/rest-gui/microcks/commons/util/src/main/java/io/github/microcks/util/AvroUtil.java
@@ -0,0 +1,332 @@
+/*
+ * Copyright The Microcks Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.github.microcks.util;
+
+import org.apache.avro.AvroTypeException;
+import org.apache.avro.Schema;
+import org.apache.avro.generic.GenericData;
+import org.apache.avro.generic.GenericDatumReader;
+import org.apache.avro.generic.GenericDatumWriter;
+import org.apache.avro.generic.GenericRecord;
+import org.apache.avro.io.DatumReader;
+import org.apache.avro.io.Decoder;
+import org.apache.avro.io.DecoderFactory;
+import org.apache.avro.io.Encoder;
+import org.apache.avro.io.EncoderFactory;
+import org.apache.avro.io.JsonDecoder;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.ByteBuffer;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Helper class using utility methods for converting Avro format from and to JSON.
+ * @author laurent
+ */
+public class AvroUtil {
+
+ private AvroUtil() {
+ // Private constructor to hide implicit public one.
+ }
+
+ /**
+ * Convert a Avro schema string into a Schema object.
+ * @param avroSchema String representation of an Avro Schema to use for conversion
+ * @return The Avro Schema to use
+ * @throws org.apache.avro.SchemaParseException if the schema is not valid
+ */
+ public static Schema getSchema(String avroSchema) {
+ return new Schema.Parser().parse(avroSchema);
+ }
+
+ /**
+ * Convert a JSON string into an Avro binary representation using specified schema.
+ * @param json A JSON string to convert to Avro
+ * @param avroSchema String representation of an Avro Schema to use for conversion
+ * @return The Avro binary representation of JSON
+ * @throws AvroTypeException if there's a mismatch between JSON string and Avro Schema
+ * @throws IOException if something goes wrong during conversion
+ */
+ public static byte[] jsonToAvro(String json, String avroSchema) throws AvroTypeException, IOException {
+ return jsonToAvro(json, getSchema(avroSchema));
+ }
+
+ /**
+ * Convert a JSON string into an Avro binary representation using specified schema.
+ * @param json A JSON string to convert to Avro
+ * @param avroSchema The Avro Schema to use for conversion
+ * @return The Avro binary representation of JSON
+ * @throws AvroTypeException if there's a mismatch between JSON string and Avro Schema
+ * @throws IOException if something goes wrong during conversion
+ */
+ public static byte[] jsonToAvro(String json, Schema avroSchema) throws AvroTypeException, IOException {
+ if (avroSchema.isUnion()) {
+ // If the schema is a union, we need to find the right schema to use.
+ for (Schema schema : avroSchema.getTypes()) {
+ try {
+ return jsonToAvro(json, schema);
+ } catch (AvroTypeException e) {
+ // Ignore and try next schema.
+ }
+ }
+ throw new AvroTypeException("No schema in union matches JSON data");
+ }
+ // Prepare reader an input stream from Json string.
+ GenericDatumReader reader = new GenericDatumReader<>(avroSchema);
+ InputStream input = new ByteArrayInputStream(json.getBytes(StandardCharsets.UTF_8));
+ JsonDecoder jsonDecoder = DecoderFactory.get().jsonDecoder(avroSchema, input);
+
+ // Prepare write and output stream to produce binary encoding.
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ GenericDatumWriter