Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added preferred usage of camelCase

...

The info.version field is used to provide the version of the application API.

Note: Align URLs to include only the MAJOR version. For example, the base path MUST only contain the MAJOR version number.

In ONAP, the info.version field MUST be set to the fully-qualified version number of the Swagger file (ex: 1.4.18). Further information about versioning is ONAP may be found at: https://wikilf-onap.onapatlassian.orgnet/wiki/display/DW/ONAP+API+Common+Versioning+Strategy+%28CVS%29+Guidelines

Extension Fields

Within the info section, the following are extensions of the Swagger specification and SHALL be required for ONAP:

...

For ONAP, it is recommended that the operationId field within a path operation be formed as: <objectName>"_"<><operation>. (e.g., pets_get)petsGet) using camelCase for word separation.

Operation Summary

The summary field within a path operation MUST be present and non-empty.

...

Definition descriptions MUST be present and non-empty string for each model property.

Examples

All Model Properties that are not $refs should have an example value specified.

Local Definitions

The API specification should not have local definitions (i.e. only $refs are allowed)

That is, APIs should not have the definitions section (even if these local definitions are not used). Instead, schemas should be kept in domains and referenced using domain references.

A domain is a library of common components – such as parameters, responses and data models – that are used across multiple API definitions

Naming Conventions

URL Construction

...

Forward slash separator (/) must be used to indicate a hierarchical relationship

Use Prefer camelCase, but if necessary use Hyphens (-) instead of Underscores (_)  if separation of words is needed in the URI

...

Further Information may be found at: https://wikilf-onap.onapatlassian.orgnet/wiki/display/DW/RESTful+API+Design+Specification

Pluralization of Resource names

...

Property names should be simple, meaningful, and descriptive with defined semantics.

Property names MUST be camel-casedcamelCased, ascii strings.

The first character MUST be a letter.

...