All Projects → swagger-api → Swagger Scala Module

swagger-api / Swagger Scala Module

Swagger support for scala

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to Swagger Scala Module

Drf Spectacular
Sane and flexible OpenAPI 3 schema generation for Django REST framework.
Stars: ✭ 414 (+345.16%)
Mutual labels:  swagger, openapi-specification
Oas Kit
Convert Swagger 2.0 definitions to OpenAPI 3.0 and resolve/validate/lint
Stars: ✭ 516 (+454.84%)
Mutual labels:  swagger, openapi-specification
Swagger Ui
Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
Stars: ✭ 21,279 (+22780.65%)
Mutual labels:  swagger, openapi-specification
Openapi.tools
A collection of Editors, Linters, Parsers, Code Generators, Documentation, Testing
Stars: ✭ 257 (+176.34%)
Mutual labels:  swagger, openapi-specification
Swagger Editor
Swagger Editor
Stars: ✭ 7,365 (+7819.35%)
Mutual labels:  swagger, openapi-specification
Swagger Play
Stars: ✭ 320 (+244.09%)
Mutual labels:  swagger, openapi-specification
Swagger Samples
Samples for the various Swagger projects under swagger-api
Stars: ✭ 499 (+436.56%)
Mutual labels:  swagger, openapi-specification
Openapi Diff
Utility for comparing two OpenAPI specifications.
Stars: ✭ 208 (+123.66%)
Mutual labels:  swagger, openapi-specification
Spectral
A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v2 & v3.
Stars: ✭ 876 (+841.94%)
Mutual labels:  swagger, openapi-specification
Swagger Core
Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API
Stars: ✭ 6,898 (+7317.2%)
Mutual labels:  swagger, openapi-specification
openapi-schemas
JSON Schemas for every version of the OpenAPI Specification
Stars: ✭ 22 (-76.34%)
Mutual labels:  swagger, openapi-specification
Connect Api Specification
This repository contains the OpenAPI specification as well as templates for generating SDKs for Square's APIs
Stars: ✭ 56 (-39.78%)
Mutual labels:  swagger, openapi-specification
qingstor-api-specs
Specifications of QingStor APIs.
Stars: ✭ 14 (-84.95%)
Mutual labels:  swagger, openapi-specification
Swagger Node
Swagger module for node.js
Stars: ✭ 3,917 (+4111.83%)
Mutual labels:  swagger, openapi-specification
Flasgger
Easy OpenAPI specs and Swagger UI for your Flask API
Stars: ✭ 2,825 (+2937.63%)
Mutual labels:  swagger, openapi-specification
Swagger Parser
Swagger Spec to Java POJOs
Stars: ✭ 468 (+403.23%)
Mutual labels:  swagger, openapi-specification
Swagger Js
Javascript library to connect to swagger-enabled APIs via browser or nodejs
Stars: ✭ 2,319 (+2393.55%)
Mutual labels:  swagger, openapi-specification
Redoc
📘 OpenAPI/Swagger-generated API Reference Documentation
Stars: ✭ 15,935 (+17034.41%)
Mutual labels:  swagger, openapi-specification
Apispec
A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)..
Stars: ✭ 831 (+793.55%)
Mutual labels:  swagger, openapi-specification
Openapi To Graphql
Translate APIs described by OpenAPI Specifications (OAS) into GraphQL
Stars: ✭ 973 (+946.24%)
Mutual labels:  swagger, openapi-specification

Swagger Scala Module

Build Status Maven Central

The goal of Swagger™ is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined via Swagger, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interfaces have done for lower-level programming, Swagger removes the guesswork in calling the service.

Swagger-scala-module is a pure scala module for use with the swagger framework.

Check out Swagger-Spec for additional information about the Swagger project, including additional libraries with support for SpringMVC, other languages and more.

See the Wiki!

The github wiki contains documentation, samples, etc. Start there.

Compatibility

This project is compatible with swagger-core 1.5.x or greater.

Usage

To enable the swagger-scala-module, include the appropriate version in your project:

  "io.swagger" %% "swagger-scala-module" % "1.0.7-SNAPSHOT"

Which will include the proper cross-publish version of swagger-scala-module.

How does it work?

Including the library in your project allows the swagger extension module to discover this module, bringing in the appropriate jackson library in the process. You can then use scala classes and objects in your swagger project.

Treatment of Option and required

All properties, besides those wrapped in Option or explicitly set via annotations @ApiModelProperty(required = false), default to required = true in the generated swagger model. See #7

How to hide model properties

@ApiModelProperty(hidden = true) does not work because Scala generates a field and a getter for public properties. The annotation will hide the getter, but the field of the same name will still be visible.

To hide the property, instruct the Scala compiler to annotate both the field and the getter:

import io.swagger.annotations.{ApiModel, ApiModelProperty}
import scala.annotation.meta.{field,getter}

@ApiModel
case class Foo(
  @ApiModelProperty(value = "This will not be hidden!", hidden = true)
  stillVisible: Int,

  @(ApiModelProperty @field @getter)(value = "A hidden property", hidden = true)
  actuallyHidden: String
)

Support

The following methods are available to obtain support for Swagger:

  • The Swagger Google Group - This would normally be your first stop to get support for Swagger. Here you can find previously asked question, and ask new ones. When asking a question, please provide as much information as you can regarding the environment you use (development language, library, versions.
  • The Issues tab - Please open feature requests and bugs here. If you're not sure you encountered a bug, or if it's a general usage question, please use the Google Group mentioned above.
  • IRC! you can find us on freenode in the channel #Swagger. You can talk with us directly there.

Get started with Swagger!

See the guide on getting started with swagger to get started with adding swagger to your API.

To build from source

sbt publishLocal

Security contact

Please disclose any security-related issues or vulnerabilities by emailing [email protected], instead of using the public issue tracker.

License

Copyright 2016 SmartBear Software, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].