Skip to content

shinesolutions/swagger-aem

Repository files navigation

API Build Status Python Build Status Ruby Build Status

Swagger AEM

Swagger AEM is an OpenAPI specification for Adobe Experience Manager (AEM) API.

This specification is used to generate client libraries for Ruby, Python, node.js, and Java using OpenAPI Generator.

Learn more about Swagger AEM:

Swagger AEM is part of AEM OpenCloud platform but it can be used as a stand-alone.

Generated Clients

Language Package Getting Started
Ruby swagger_aem Published Version README CHANGELOG
Python swaggeraem Published Version README CHANGELOG
Java swaggeraem4j Published Version README CHANGELOG

Development

To generate API clients (note that at different time, there could be some changes that have to be retrofitted since they're not yet included in OpenAPI Generator):

make deps-ruby generate-ruby ruby

make deps-python generate-python python

If you want to use a custom openapi-generator-cli-<version>.jar, place the custom jar at stage/openapi-generator-cli.jar, then run:

make generate-ruby ruby

make generate-python python

Testing

Unit tests are generated by OpenAPI Generator along with the client code.

Integration tests are part of Swagger AEM and require an AEM instance running on default port 4502 (can be overridden using environment variable aem_port) with Shine Solutions AEM Health Check package installed.

Frequently Asked Questions

  • Q: Why does each OSGI config need to be declared as a single operation in the OpenAPI spec?
    A: There are two reasons. The first one is to explicitly define which parameters are relevant for which OSGI config, which won't be clear when we have one operation for all OSGI configs with all parameters declared within that operation. The second one is to manage the usability of the generated code. A single operation will translate to a single method with all parameters supported, which is fine in generated Ruby client because it supports optional hash, but it's a problem with generated Java client because all parameters will be declared within the method signature where caller will have to pass in nulls for the parameters that aren't relevant for the OSGI config being processed, on top of the risk of hitting maximum number of 255 parameters per method (as per JVM Specification for Java SE 11).

Contribution

Since swagger-aem contains multiple languages, add a [ruby|python|java] prefix to language-specific commits, this will help with filtering full commits log.

Tagging should also be prefixed with:

  • api when the release is for the OpenAPI specification, e.g. api-1.0.0
  • ruby|python|java when the release is for the generated client, e.g. ruby-0.9.2, python-0.9.0

Presentations