Project

Profile

Help

Task #3580

closed

Document how to generate REST API bindings using swagger-codegen

Added by dkliban@redhat.com over 6 years ago. Updated over 5 years ago.

Status:
CLOSED - COMPLETE
Priority:
Normal
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
API Bindings, Pulp 2
Sprint:
Sprint 42
Quarter:

Description

With help from swagger-codegen[0], Pulp's API schema can be used to generate bindings in many different languages.

I was able to GET the schema in JSON format from http://localhost:8000/api/v3/docs/api.json and then uploaded the JSON file to swagger editor[1]. I then clicked on "Generate Client" and selected "Python". This produced a ZIP archive that contained a python package with the bindings and documentation. The hosted solution is backed by a Java application called swagger-codegen[2].

The goal of this task is to document how swagger-codegen can be used from the command line to generate bindings in any language supported by swagger-codegen.

[0] https://swagger.io/swagger-codegen/
[1] http://editor.swagger.io/#/
[2] https://github.com/swagger-api/swagger-codegen


Related issues

Copied from Python Support - Task #3579: Publish REST API bindings for Python on PyPICLOSED - COMPLETE

Actions

Also available in: Atom PDF