Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shinesolutions/swagger-aem

OpenAPI specification for Adobe Experience Manager (AEM) API
https://github.com/shinesolutions/swagger-aem

aem aem-opencloud api-client api-spec openapi

Last synced: about 2 hours ago
JSON representation

OpenAPI specification for Adobe Experience Manager (AEM) API

Awesome Lists containing this project

README

        

[![API Build Status](https://github.com/shinesolutions/swagger-aem/actions/workflows/api-ci-workflow.yaml/badge.svg)](https://github.com/shinesolutions/swagger-aem/actions/workflows/api-ci-workflow.yaml)
[![Python Build Status](https://github.com/shinesolutions/swagger-aem/actions/workflows/python-ci-workflow.yaml/badge.svg)](https://github.com/shinesolutions/swagger-aem/actions/workflows/python-ci-workflow.yaml)
[![Ruby Build Status](https://github.com/shinesolutions/swagger-aem/actions/workflows/ruby-ci-workflow.yaml/badge.svg)](https://github.com/shinesolutions/swagger-aem/actions/workflows/ruby-ci-workflow.yaml)

Swagger AEM
-----------

Swagger AEM is an OpenAPI specification for [Adobe Experience Manager (AEM)](http://www.adobe.com/au/marketing-cloud/enterprise-content-management.html) API.

This specification is used to generate client libraries for Ruby, Python, node.js, and Java using [OpenAPI Generator](https://openapi-generator.tech/).

Learn more about Swagger AEM:

* [Generated Clients](https://github.com/shinesolutions/swagger-aem#generated-clients)
* [Development](https://github.com/shinesolutions/swagger-aem#development)
* [Testing](https://github.com/shinesolutions/swagger-aem#testing)
* [Frequently Asked Questions](https://github.com/shinesolutions/swagger-aem#frequently-asked-questions)
* [Versions History](https://github.com/shinesolutions/swagger-aem/blob/main/docs/versions.md)
* [Contribution](https://github.com/shinesolutions/swagger-aem#contribution)
* [Presentations](https://github.com/shinesolutions/swagger-aem/#presentations)

Swagger AEM is part of [AEM OpenCloud](https://aemopencloud.io) platform but it can be used as a stand-alone.

Generated Clients
-----------------

| Language | Package | Getting Started |
|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Ruby | [swagger_aem](https://rubygems.org/gems/swagger_aem) [![Published Version](https://badge.fury.io/rb/swagger_aem.svg)](https://rubygems.org/gems/swagger_aem) | [README](https://github.com/shinesolutions/swagger-aem/blob/main/ruby/README.md) [CHANGELOG](https://github.com/shinesolutions/swagger-aem/blob/main/ruby/CHANGELOG.md) |
| Python | [swaggeraem](https://pypi.python.org/pypi/swaggeraem) [![Published Version](https://badge.fury.io/py/swaggeraem.svg)](https://pypi.python.org/pypi/swaggeraem) | [README](https://github.com/shinesolutions/swagger-aem/blob/main/python/README.md) [CHANGELOG](https://github.com/shinesolutions/swagger-aem/blob/main/python/CHANGELOG.md) |
| Java | [swaggeraem4j](http://mvnrepository.com/artifact/com.shinesolutions/swaggeraem4j) [![Published Version](https://maven-badges.herokuapp.com/maven-central/com.shinesolutions/swaggeraem4j/badge.svg)](http://mvnrepository.com/artifact/com.shinesolutions/swaggeraem4j) | [README](https://github.com/shinesolutions/swagger-aem/blob/main/java/README.md) [CHANGELOG](https://github.com/shinesolutions/swagger-aem/blob/main/java/CHANGELOG.md) |

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-.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](https://github.com/shinesolutions/aem-healthcheck) 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 `null`s 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](https://docs.oracle.com/javase/specs/jvms/se11/html/jvms-4.html#jvms-4.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
-------------

* [Swagger AEM - An OpenAPI Specification for AEM](https://www.slideshare.net/cliffano/swagger-aem-an-openapi-specification-for-aem) at [adaptTo() 2019](https://adapt.to/2019/en.html)
* [Beyond AEM Curl Commands](https://www.slideshare.net/cliffano/beyond-aem-curl-commands) at [Adobe Immerse'18](https://immerse18.adobe-devs.adobeevents.com/)
* [Building An AEM API Clients Ecosystem](https://www.slideshare.net/cliffano/building-an-aem-api-clients-ecosystem/) at [Adobe Experience Cloud Meetup - 5th Edition](https://www.meetup.com/Melbourne-Adobe-Experience-Cloud/events/249851899/)