{"id":21684691,"url":"https://github.com/openapi-tools/api-pp-maven-plugin","last_synced_at":"2025-03-20T11:27:08.009Z","repository":{"id":57735930,"uuid":"120184255","full_name":"openapi-tools/api-pp-maven-plugin","owner":"openapi-tools","description":"Maven module for Post Processing Open API specifications making service evolution easier","archived":false,"fork":false,"pushed_at":"2018-12-01T17:25:58.000Z","size":26,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-25T12:07:02.933Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openapi-tools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-04T12:47:30.000Z","updated_at":"2018-12-01T17:24:15.000Z","dependencies_parsed_at":"2022-08-24T13:40:48.011Z","dependency_job_id":null,"html_url":"https://github.com/openapi-tools/api-pp-maven-plugin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapi-tools%2Fapi-pp-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapi-tools%2Fapi-pp-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapi-tools%2Fapi-pp-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openapi-tools%2Fapi-pp-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openapi-tools","download_url":"https://codeload.github.com/openapi-tools/api-pp-maven-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244602943,"owners_count":20479730,"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":[],"created_at":"2024-11-25T16:16:47.463Z","updated_at":"2025-03-20T11:27:07.987Z","avatar_url":"https://github.com/openapi-tools.png","language":"Java","readme":"# API Post Processing Maven Plugin\n\nThe long story short: this module avoids annotation clutter in your code and gives you the ability to process your Open API specification\nin your continous build or pipeline before piublishing your Open API specification. \n\nThe plugin allows you to include resposes like 301 to allow for future changes to resources and e.g. 202 for \ndeferred processing and so on.\n \n ## Status\n\nThis plugin is intended to use the [Swagger Core library](https://github.com/swagger-api/swagger-core) to extend\nOpenAPI specification with request and reponse headers, reponse codes etc. in order for a build pipeline to extend \nREST services with defaults. \n\n  [![Build status](https://travis-ci.org/openapi-tools/api-pp-maven-plugin.svg?branch=master)](https://travis-ci.org/openapi-tools/api-pp-maven-plugin)\n\nModule is ready as an initial version\n\n\n# Where to apply\n\nThe idea is to minimize the annotation clutter in the code and postpone what you would always and automate that as a part of development.\nThus this could be used during continous integration or as a step in the continous delivery pipeline\n - e.g. as a step for making the Open API specification ready for consumers and having added the necessary items to the specification,\nwhich makes it possible for the API to evolve whilst keeping consumers happy. The optimal situation is obtained if the content versioning\nparadigm (having support for multiple versions in same endpoint) is used.\n\n# Future\nThe initial version supports a rudimentary standard and mininmal collection of reponse and request codes and headers.\nThe module will be extended with a more fine grained support for individual request headers, response status codes and headers, if this is found useful. \n\n# Usage\n\nTo have Swagger generate the OpenAPI specifications as part of the build add in the plugin to the POM.\n\nThe standard collection of status codes and headers\n```xml\n\u003cbuild\u003e\n  \u003cplugins\u003e\n    ...\n    \u003cplugin\u003e\n      \u003cgroupId\u003eio.openapitools.api.specification\u003c/groupId\u003e\n      \u003cartifactId\u003eapi-pp-maven-plugin\u003c/artifactId\u003e\n      \u003cconfiguration\u003e\n        \u003cpackages\u003e\n          \u003cpackage\u003estandard\u003c/package\u003e\n        \u003c/packages\u003e\n      \u003c/configuration\u003e\n    \u003c/plugin\u003e\n    ...\n  \u003c/plugins\u003e\n\u003c/build\u003e\n```\n\nThis will run the generation in the verify lifecycle stage of the Maven build.\n\n## Specifying Packages\n\nThe packages currently supported are:\n\n    standard - adds (200, 201, 202, 203, 204, 301, 304, 307, 400, 401, 402, 403, 404, 406, 410, 412, 415, 422, 429, 500, 501, 503, 505 ....)\n    minimum  - adds (200, 202, 204, 301, 304, 400, 415, 500) \n    \nNot supported yet:\n\n    individual - adding individual reponse codes and/or headers, but will be if enough people find it useful\n\n\n### Full Configuration - Standard Post Processing\n\nThe fully populated configuration example giving the _standard_ post processing collection of the Open API. \n\n```xml\n\u003cbuild\u003e\n  \u003cplugins\u003e\n    ...\n        \u003cplugin\u003e\n          \u003cgroupId\u003eio.openapitools.swagger\u003c/groupId\u003e\n          \u003cartifactId\u003eapi-pp-maven-plugin\u003c/artifactId\u003e\n          \u003cconfiguration\u003e\n              \u003cpackages\u003e\n                  \u003cpackage\u003estandard\u003c/package\u003e\n              \u003c/packages\u003e\n              \u003cinputDirectory\u003esample-api\u003c/inputDirectory\u003e\n              \u003cinputFilename\u003epetstore\u003c/inputFilename\u003e\n              \u003coutputDirectory\u003etarget/api-standard\u003c/outputDirectory\u003e\n              \u003coutputFilename\u003eopen-api-specs-standard\u003c/outputFilename\u003e\n              \u003coutputFormats\u003e\n                  \u003coutputFormat\u003eJSON\u003c/outputFormat\u003e\n                  \u003coutputFormat\u003eYAML\u003c/outputFormat\u003e\n              \u003c/outputFormats\u003e\n          \u003c/configuration\u003e\n        \u003c/plugin\u003e\n    ...\n  \u003c/plugins\u003e\n\u003c/build\u003e\n```\n\n### Minimum Config - Standard Post processing\n\nThe min populated configuration example giving the _standard_ post processing collection of the Open API. \n\n```xml\n\u003cbuild\u003e\n  \u003cplugins\u003e\n    ...\n        \u003cplugins\u003e\n           \u003cplugin\u003e\n               \u003cgroupId\u003eio.openapitools.swagger\u003c/groupId\u003e\n               \u003cartifactId\u003eapi-pp-maven-plugin\u003c/artifactId\u003e\n               \u003cconfiguration\u003e\n                   \u003cinputDirectory\u003esample-api\u003c/inputDirectory\u003e\n                   \u003cinputFilename\u003epetstore\u003c/inputFilename\u003e\n                   \u003coutputDirectory\u003etarget/open-api-minimal-config\u003c/outputDirectory\u003e\n               \u003c/configuration\u003e\n           \u003c/plugin\u003e\n   ...\n  \u003c/plugins\u003e\n\u003c/build\u003e\n```\n\n### Full Configuration - Minimum Post Processing\n\nThe fully populated configuration example giving the _minimal_ post processing collection of the Open API. \n\n```xml\n\u003cbuild\u003e\n  \u003cplugins\u003e\n    ...\n        \u003cplugin\u003e\n           \u003cgroupId\u003eio.openapitools.swagger\u003c/groupId\u003e\n           \u003cartifactId\u003eapi-pp-maven-plugin\u003c/artifactId\u003e\n           \u003cconfiguration\u003e\n               \u003cpackages\u003e\n                   \u003cpackage\u003eminimal\u003c/package\u003e\n               \u003c/packages\u003e\n               \u003cinputDirectory\u003esample-api\u003c/inputDirectory\u003e\n               \u003cinputFilename\u003epetstore\u003c/inputFilename\u003e\n               \u003coutputDirectory\u003etarget/api-min\u003c/outputDirectory\u003e\n               \u003coutputFilename\u003eopen-api-specs-minimum\u003c/outputFilename\u003e\n               \u003coutputFormats\u003e\n                   \u003coutputFormat\u003eJSON\u003c/outputFormat\u003e\n                   \u003coutputFormat\u003eYAML\u003c/outputFormat\u003e\n               \u003c/outputFormats\u003e\n           \u003c/configuration\u003e\n       \u003c/plugin\u003e\n    ...\n  \u003c/plugins\u003e\n\u003c/build\u003e\n```\n\n### Inidividual Codes Configuration - Post Processing\n\nThe fully populated configuration example giving the _minimal_ post processing collection of the Open API. \n ```xml\n \u003cbuild\u003e\n   \u003cplugins\u003e\n     ... \n        \u003cplugin\u003e\n             \u003cgroupId\u003eio.openapitools.swagger\u003c/groupId\u003e\n             \u003cartifactId\u003eapi-pp-maven-plugin\u003c/artifactId\u003e\n             \u003cconfiguration\u003e\n                 \u003cpackages/\u003e\n                 \u003ccodes\u003e\n                     \u003ccode\u003e200\u003c/code\u003e\n                     \u003ccode\u003e201\u003c/code\u003e\n                     \u003ccode\u003e202\u003c/code\u003e\n                     \u003ccode\u003e204\u003c/code\u003e\n                     \u003ccode\u003e301\u003c/code\u003e\n                     \u003ccode\u003e304\u003c/code\u003e\n                     \u003ccode\u003e400\u003c/code\u003e\n                     \u003ccode\u003e415\u003c/code\u003e\n                     \u003ccode\u003e500\u003c/code\u003e\n                 \u003c/codes\u003e\n                 \u003cinputDirectory\u003esample-api\u003c/inputDirectory\u003e\n                 \u003cinputFilename\u003epetstore\u003c/inputFilename\u003e\n                 \u003coutputDirectory\u003etarget/api-codes-min\u003c/outputDirectory\u003e\n                 \u003coutputFilename\u003eopen-api-specs-codes-min\u003c/outputFilename\u003e\n                 \u003coutputFormats\u003e\n                     \u003coutputFormat\u003eJSON\u003c/outputFormat\u003e\n                     \u003coutputFormat\u003eYAML\u003c/outputFormat\u003e\n                 \u003c/outputFormats\u003e\n             \u003c/configuration\u003e\n         \u003c/plugin\u003e\n    ...\n   \u003c/plugins\u003e\n \u003c/build\u003e\n ```\n\n## Deploying\n\nThe generated post processed OpenAPI specifications may be installed and deployed as Maven artifact.\n To enable this add the configuration parameter attachArtifact.\n\n```xml\n\u003cplugin\u003e\n  \u003cgroupId\u003eio.openapitools.api.specification\u003c/groupId\u003e\n  \u003cartifactId\u003eapi-pp-maven-plugin\u003c/artifactId\u003e\n  \u003cconfiguration\u003e\n    \u003cattachArtifact\u003etrue\u003c/attachArtifact\u003e\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenapi-tools%2Fapi-pp-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenapi-tools%2Fapi-pp-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenapi-tools%2Fapi-pp-maven-plugin/lists"}