{"id":23088661,"url":"https://github.com/openvalidation/openvalidation-openapi","last_synced_at":"2025-08-16T07:31:40.895Z","repository":{"id":57735991,"uuid":"204974336","full_name":"openvalidation/openvalidation-openapi","owner":"openvalidation","description":"Generate OpenAPI service stubs with complete validation layer using this openVALIDATION adapter.","archived":false,"fork":false,"pushed_at":"2023-04-14T17:48:33.000Z","size":70,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-05-25T16:12:39.709Z","etag":null,"topics":["code-generation","csharp","java-8","javascript","openapi","service-contracts","service-stubs","validation-rules"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openvalidation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-28T16:18:50.000Z","updated_at":"2020-03-05T16:36:34.000Z","dependencies_parsed_at":"2022-09-14T13:22:28.502Z","dependency_job_id":null,"html_url":"https://github.com/openvalidation/openvalidation-openapi","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openvalidation%2Fopenvalidation-openapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openvalidation%2Fopenvalidation-openapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openvalidation%2Fopenvalidation-openapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openvalidation%2Fopenvalidation-openapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openvalidation","download_url":"https://codeload.github.com/openvalidation/openvalidation-openapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230019812,"owners_count":18160603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-generation","csharp","java-8","javascript","openapi","service-contracts","service-stubs","validation-rules"],"created_at":"2024-12-16T20:17:38.120Z","updated_at":"2024-12-16T20:17:38.859Z","avatar_url":"https://github.com/openvalidation.png","language":"Java","readme":"[![Build Status](https://dev.azure.com/validaria/openvalidation/_apis/build/status/openVALIDATION%20OpenAPI/openVALIDATION%20OpenAPI%20master?branchName=master)](https://dev.azure.com/validaria/openvalidation/_build/latest?definitionId=3\u0026branchName=master)\n![Azure DevOps tests (compact)](https://img.shields.io/azure-devops/tests/validaria/openvalidation/3?compact_message)\n[![Maven Central](https://img.shields.io/maven-central/v/io.openvalidation/openvalidation-openapi-generator)](https://search.maven.org/search?q=g:io.openvalidation)\n[![Follow us on Twitter](https://img.shields.io/twitter/follow/openVALIDATION?style=social)](https://twitter.com/openVALIDATION)\n\n\n# OpenAPI Generator for openVALIDATION\n\nThis project provides an openapi-generator integration to generate services with validation logic provided by openVALIDATION.\n\n## What's OpenAPI\nThe goal of OpenAPI is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection.\nWhen properly described with OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic.\nSimilar to what interfaces have done for lower-level programming, OpenAPI removes the guesswork in calling the service.\n\nCheck out [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) for additional information about the OpenAPI project, including additional libraries with support for other languages and more. \n\n## What's openVALIDATION\n\nCheck out [openVALIDATION](https://github.com/openvalidation/openvalidation) to learn about human readable validation rules for software solutions.\n\n## openVALIDATION OpenAPI Codegen Documentation\n\n[Documentation](https://docs.openvalidation.io/openapi/openapi-specification)\n\n[Tutorial](https://docs.openvalidation.io/openapi/openapi-tutorial)\n\n## How do I use this?\n\nDownload the [openVALIDATION OpenAPI generator CLI](https://downloadarchive.blob.core.windows.net/openvalidation-openapi-generator/ov-openapi-generator-cli.jar) (requires the Java SE 8 runtime environment).\nUse `ov-openapi-generator-cli.jar` as a drop-in replacement for the `openapi-generator-cli.jar`\n\nNow you can use openVALIDATION rules in your service contract:\n```yaml\npaths:\n  /: \n   post:\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/applicant'\n            x-ov-rules:\n              culture: en\n              rule: |\n                the location of the applicant must be Dortmund\n      responses:\n        '200':\n          description: success\ncomponents:\n  schemas:\n    applicant:\n      type: object\n      properties:\n        name:\n          type: string\n        age:\n          type: integer\n        location:\n          type: string\n```\n*(For further details check the above-mentioned documentation or the openVALIDATION project itself.)*\n\nAlternatively, the `openvalidation-openapi-generator` jar itself can be called in combination with the OpenAPI generator.\n\nFor mac/linux:\n```\njava -cp /path/to/openapi-generator-cli.jar:/path/to/openvalidation-openapi-generator.jar org.openapitools.codegen.OpenAPIGenerator generate -g ov-java-spring-server -i /path/to/openapi.yaml -o ./test\n```\n(Do not forget to replace the values `/path/to/openapi-generator-cli.jar`, `/path/to/openvalidation-openapi-generator.jar` and `/path/to/openapi.yaml` in the previous command)\n\nFor Windows users, you will need to use `;` instead of `:` in the classpath, e.g.\n```\njava -cp /path/to/openapi-generator-cli.jar;/path/to/openvalidation-openapi-generator.jar org.openapitools.codegen.OpenAPIGenerator generate -g ov-java-spring-server -i /path/to/openapi.yaml -o ./test\n```\n\nOr use openVALIDATION Generator as Maven Plugin:\n```xml\n    \u003cbuild\u003e\n        \u003cplugins\u003e\n            \u003cplugin\u003e\n                \u003cgroupId\u003eorg.openapitools\u003c/groupId\u003e\n                \u003cartifactId\u003eopenapi-generator-maven-plugin\u003c/artifactId\u003e\n                \u003cversion\u003e3.3.4\u003c/version\u003e\n                \u003cexecutions\u003e\n                    \u003cexecution\u003e\n                        \u003cgoals\u003e\n                            \u003cgoal\u003egenerate\u003c/goal\u003e\n                        \u003c/goals\u003e\n                        \u003cconfiguration\u003e\n                            \u003cinputSpec\u003e${project.basedir}/my.spec.yaml\u003c/inputSpec\u003e\n                            \u003cgeneratorName\u003eov-java-rules\u003c/generatorName\u003e \u003c!- rules only generation --\u003e\n                            \u003cconfigOptions\u003e\n                                \u003cinvokerPackage\u003emy.custom.package\u003c/invokerPackage\u003e\n                                \u003cmodelPackage\u003emy.custom.package.model\u003c/modelPackage\u003e\n                            \u003c/configOptions\u003e\n                        \u003c/configuration\u003e\n                    \u003c/execution\u003e\n                \u003c/executions\u003e\n                \u003cdependencies\u003e\n                    \u003cdependency\u003e\n                        \u003cgroupId\u003eio.openvalidation\u003c/groupId\u003e\n                        \u003cartifactId\u003eopenvalidation-openapi-generator\u003c/artifactId\u003e\n                        \u003cversion\u003e0.0.1\u003c/version\u003e\n                    \u003c/dependency\u003e\n                \u003c/dependencies\u003e\n            \u003c/plugin\u003e\n        \u003c/plugins\u003e\n    \u003c/build\u003e\n```\n\n\n## Getting involved\n\nPlease refer to our [contribution guidelines](CONTRIBUTING.md).\n\n## Contact\n\nYou can write an [E-Mail](mailto:validaria@openvalidation.io) or mention our twitter account [@openVALIDATION](https://twitter.com/openvalidation).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenvalidation%2Fopenvalidation-openapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenvalidation%2Fopenvalidation-openapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenvalidation%2Fopenvalidation-openapi/lists"}