Tag: openAPI

php-openapi make implementations of built-in interfaces PHP 8.1 friendly

Problem Unfortunately, PHP 8.1 throws Fatal Error if the built-in interface implementation is incompatible with the new, type enhanced interfaces. Example error: Fatal error: During inheritance of ArrayAccess: Uncaught Return type of cebeopenapispecResponses::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[ReturnTypeWillChange] attribute should be used to temporarily…

Continue Reading php-openapi make implementations of built-in interfaces PHP 8.1 friendly

java – OpenApi Generator to generate parameter with @RequestBody as String

I have the following OpenApi specs: paths: /student: post: requestBody: required: true content: application/json: schema: $ref: “#/components/schemas/Student” responses: 204: components: schemas: Student: type: object properties: name: type: string school: type: string With org.openapitools.generator, it generates a controller with function like below void addStudent(@RequestBody Student student) { } Is there any…

Continue Reading java – OpenApi Generator to generate parameter with @RequestBody as String

[META] Drop dependency on schemata for something more json:api specific/lighter [#3258301]

Per conversation with a number of api-first maintainers/OGs as reflected on #3258113: [META] Future of Schemata/Compatibility with other ecosystem modules: @richgerdes: …maybe the openapi side of the house could just work off of the jsonapi_schema system instead and schemata can be left for more general entity schema and rest? I…

Continue Reading [META] Drop dependency on schemata for something more json:api specific/lighter [#3258301]

node.js – OpenAPI: “request should have required property ‘body'”

I am building out a new endpoint in my application which uses express-openapi-validator as validator middleware. /* index.ts */ import * as OpenApiValidator from ‘express-openapi-validator’; const whitelistedPaths = [/* regex tested paths */]; app.use( OpenApiValidator.middleware({ apiSpec: ‘./schema/api.json’, validateRequests: true, validateResponses: true, ignorePaths: whitelistedPaths, validateSecurity: true, }), ); /* … */…

Continue Reading node.js – OpenAPI: “request should have required property ‘body'”

drf-spectacular support OpenAPI 3.1 | GitAnswer

Are there any plans to support OpenAPI v3.1? If yes when can we expect it? If nothing else it will allow exploded arrays for multipart/form-data requests which is the default behavior of MultipartParser. spec.openapis.org/oas/v3.1.0#fixed-fields-12 Asked May 7 ’21 at 08:43 BorisBeast 2 Answers: hi @BorisBeast, the plan is definitely there….

Continue Reading drf-spectacular support OpenAPI 3.1 | GitAnswer

swagger – How to define this array of objects in OpenAPI?

How to write an OpenAPI definition for the following JSON? Bazically it is an array consisting of two objects with similar attributes but different fields. [ { “studentname”: “somename”, “studentrollno”: “somerollno”, “studentsubjects”: [ { “level”: “third”, “physics”: “xyz”, “maths”: “somevalue” }, { “level”: “second”, “physics”: “abc”, “maths”: “somevalue11” } ],…

Continue Reading swagger – How to define this array of objects in OpenAPI?

Introducing CreateAPI | kean.blog

If you’ve tried OpenAPI spec generators, you know how it goes. They get you about 60-80% there, but you end up having to modify the code by hand. For one of the specs (GitHub REST API spec), a popular code generator I tried produced more than 300 compile-time errors. With…

Continue Reading Introducing CreateAPI | kean.blog

swagger – How to integrate openapi specifications from different APIs?

This bounty has ended. Answers to this question are eligible for a +50 reputation bounty. Bounty grace period ends in 15 hours. cah1r wants to draw more attention to this question: Needing a good solution on how to solve this problem I wanted to ask if…

Continue Reading swagger – How to integrate openapi specifications from different APIs?

Support for unevaluatedProperties in OAS 3.1+? – JavaScript OpenAPI-Specification

The latest (draft 2020-12) version of JSON Schema supports the unevaluatedProperties vocabulary (see here). This is quite a useful feature, and facilitates stricter validation while composing properties from multiple sub-schemas (using e.g. allOf) than would otherwise possible. Looking through the issue history, I’ve seen a couple mentions of incorporating unevaluatedProperties…

Continue Reading Support for unevaluatedProperties in OAS 3.1+? – JavaScript OpenAPI-Specification

How to generate OpenAPI specs from Netlify functions? – Support

I would like to build a REST API using functions, with an autogenerated OpenAPI specification dependent on the functions logic. Nowadays it is fairly easy to do with a classic backend and framework such as Django, Express, etc… I know I could probably do it by including express and some…

Continue Reading How to generate OpenAPI specs from Netlify functions? – Support

Delightful code generation for OpenAPI specs for Swift written in Swift

Delightful code generation for OpenAPI specs for Swift written in Swift. Fast: processes specs with 100K lines of YAML in less than a second Smart: generates Swift code that looks like it’s written by hand Reliable: tested on 500K lines of publically available OpenAPI specs producing correct code every time…

Continue Reading Delightful code generation for OpenAPI specs for Swift written in Swift

Automation Hub Open API Power Query Data Parsing

Parsing the data from the Automation Hub API can sometimes prove to be challenging, especially if you are consolidating a very complex report. In this page, we are presenting a couple of tips and tricks that can be used to improve the overall data parsing process. The page contains: The…

Continue Reading Automation Hub Open API Power Query Data Parsing

Conditionals are not supported in this regex diale…

I have this regex evolved on www.regex101.com and it seems to work properly.  When I copy this regex into the OpenApi @Pattern annotation in a Spring Boot 2.5.4 application with springdoc-openapi (tried v1.4.8 and v1.6.1, supporting OpenApi v3) I get the message  Spoiler (Highlight to read) Conditionals are not supported in this…

Continue Reading Conditionals are not supported in this regex diale…

API Handyman | Handle API gateway and backend differences in API documentation with OpenAPI Specification

So how to deal with that regarding an OpenAPI file used as specification and documentation? Consumer’s perspective first First, what is 100% sure is that the consumers (well, their developers) must get access to a documentation describing the API from their perspective, that is the API gateway version. If the…

Continue Reading API Handyman | Handle API gateway and backend differences in API documentation with OpenAPI Specification

Saxo Bank enhances Corporate Actions group in OpenAPI

Multi-asset trading and investment specialist Saxo Bank has released a new version of its OpenAPI, the backbone of trading platforms such as SaxoTraderGO. The latest version of the OpenAPI enhances the Corporate Actions service group by adding a new section. It is called “PaymentBreakdown”. Let’s note that the Corporate Actions…

Continue Reading Saxo Bank enhances Corporate Actions group in OpenAPI

This project extends the go-chi router to support OpenAPI 3, bringing to you a simple interface to build a router conforming your API contract.

This project extends the go-chi router to support OpenAPI 3, bringing to you a simple interface to build a router conforming your API contract. Examples See _examples/ for more examples. As easy as: package main import ( _ “embed” “net/http” “github.com/go-chi/chi/v5github.com/go-chi/chi/v5/middlewaregithub.com/go-chi/rendergithub.com/angelokurtis/go-openapi ) //go:embed openapi.yaml var contract []byte…

Continue Reading This project extends the go-chi router to support OpenAPI 3, bringing to you a simple interface to build a router conforming your API contract.

[BUG] (python-fastapi) OneOf class not generated

Bug Report Checklist Description For oneOf fields, the python-fastapi server generator creates a function that returns a OneOf* class, but that class itself is not generated. For example, for an API like /status: get: summary: Get the status of the upstream server responses: 200: description: successful operation content: application/json: schema:…

Continue Reading [BUG] (python-fastapi) OneOf class not generated

Setting springdoc.api-docs.path prevents auto loading of api – springdoc-openapi Java

I can set springdoc.swagger-ui.path to a value and the swagger ui will be available under this url and load the api definition. This works fine. However, as soon as I set the value of springdoc.api-docs.path (and of course springdoc.swagger-ui.config-url to the same value + “/swagger-config”) the api definition won’t be…

Continue Reading Setting springdoc.api-docs.path prevents auto loading of api – springdoc-openapi Java

a Burp Suite extension for automating OpenAPI-based APIs security assessments

Swurg is a Burp Suite extension designed for OpenAPI testing. The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for REST APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of…

Continue Reading a Burp Suite extension for automating OpenAPI-based APIs security assessments

Paths (MicroProfile OpenAPI API 1.0 API)

Paths (MicroProfile OpenAPI API 1.0 API) JavaScript is disabled on your browser. Summary:  Nested |  Field |  Constr |  Method Detail:  Field |  Constr |  Method Nested Class Summary Nested classes/interfaces inherited from interface java.util.Map Map.Entry<K,V> Method Summary Methods inherited from interface java.util.Map clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet,…

Continue Reading Paths (MicroProfile OpenAPI API 1.0 API)

Swagger Routes Express – Open Source Agenda

Connect Express route controllers to restful paths using a Swagger v2 or OpenAPI v3 definition file. Assumptions This library assumes you are using: NodeJS version 6.4.0 or better, expressjs any version, and swagger version 2, or OpenAPI version 3. Install Add swagger-routes-express as a dependency: npm i swagger-routes-express Examples A…

Continue Reading Swagger Routes Express – Open Source Agenda

Is swagger a testing tool?

Is swagger a testing device? Swagger Examiner: A Programmer Device To Check APIs as well as Create Your OpenAPI. Creating APIs that customers enjoy is a complicated procedure. As even more companies as well as growth groups are constructing as well as leveraging APIs, there’s a raised concentrate on incorporating…

Continue Reading Is swagger a testing tool?

openapi-generator asciidoc limits parameter columns, omits type

Is there a way to specify which columns appear in the Parameters section? For example I would like to use Schema/type instead of Pattern. My configuration: <plugin> <groupId>org.openapitools</groupId> <artifactId>openapi-generator-maven-plugin</artifactId> <version>5.3.0</version> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>generate</goal> </goals> <configuration> <inputSpec>${project.basedir}/target/openapi.json</inputSpec> <generatorName>asciidoc</generatorName> <configOptions> <useIntroduction>true</useIntroduction> </configOptions> <skipValidateSpec>true</skipValidateSpec> </configuration> </execution> </executions> </plugin> Here’s the relevant…

Continue Reading openapi-generator asciidoc limits parameter columns, omits type

[BUG] [Java] Model doesn’t build when using anyof / oneof and a primitive type

I have a schema like so: openapi: 3.0.3 info: title: java codegen BUG description: oneOf generates incorrect model for primitive types version: 1.0.0 paths: /openapi/example/path: post: requestBody: content: application/json: schema: $ref: ‘#/components/schemas/Request’ responses: 200: description: OK content: application/json: schema: $ref: ‘#/components/schemas/Response’ components: schemas: MyString: type: string MySpecialString: anyOf: – $ref:…

Continue Reading [BUG] [Java] Model doesn’t build when using anyof / oneof and a primitive type

Easy OpenAPI specs and Swagger UI for your Flask API

Easy Swagger UI for your Flask API Flasgger is a Flask extension to extract OpenAPI-Specification from all Flask views registered in your API. Flasgger also comes with SwaggerUI embedded so you can access localhost:5000/apidocs and visualize and interact with your API resources. Flasgger also provides validation of the incoming data,…

Continue Reading Easy OpenAPI specs and Swagger UI for your Flask API

AWS SAM :: AWS::Serverless::Api “Invalid value for ‘Auth’ property”

I’ve managed to define a template for a Lambda behind an API GW authenticated via (dedicated) ApiKey by describing everything in the template and with no OpenApi definition. The problem arises when trying to introduce Lambda Integrations for accomplishing the mappings: it seems that they can be defined only in…

Continue Reading AWS SAM :: AWS::Serverless::Api “Invalid value for ‘Auth’ property”

openapi-diff package archive from Arch Linux : Arch Linux : Free Download, Borrow, and Streaming : Internet Archive

Can You Chip In? The Internet Archive is growing faster than ever before, and we need your help. As an independent nonprofit, we build and maintain all our own systems, but we don’t charge for access, sell user information, or run ads—instead we’re powered by donations averaging $30. Unfortunately, fewer…

Continue Reading openapi-diff package archive from Arch Linux : Arch Linux : Free Download, Borrow, and Streaming : Internet Archive

swagger – What is the media type of an OpenAPI schema?

Whenever searching for this I find resources on how to specify the media type of a resource that the schema defines, but I can’t see an answer on what the actual media type of the schema itself is. Given the way HTTP works, it makes sense to me that if…

Continue Reading swagger – What is the media type of an OpenAPI schema?

swagger – How to generate OpenAPI document/SwaggerDoc for individual controller in asp.net-core 3.1

[Seeking for more elegant way/better approaches, improvements, if any] My/OP’s approach: Annotate/attribute individual controllers with (if controller has multiple version, then use the same tag at method level instead of class level): [ApiExplorerSettings(GroupName = “v1/Employees”)] This creates logical grouping of controllers. While registering services, register a key-value pair with SwaggerDoc…

Continue Reading swagger – How to generate OpenAPI document/SwaggerDoc for individual controller in asp.net-core 3.1

Tag (MicroProfile OpenAPI API)

Tag (MicroProfile OpenAPI API) JavaScript is disabled on your browser. MicroProfile OpenAPI API v2.0 Summary:  Nested |  Field |  Constr |  Method Detail:  Field |  Constr |  Method Method Detail setName void setName(String name) Sets the name property of a Tag instance to the given string. Parameters: name – the name property for this tag name default Tag name(String name)…

Continue Reading Tag (MicroProfile OpenAPI API)

Central Repository: org/openapitools/openapi-generator-core/4.0.0

../ openapi-generator-core-4.0.0-javadoc.jar 2019-05-13 13:27 60050 openapi-generator-core-4.0.0-javadoc.jar.asc 2019-05-13 13:27 819 openapi-generator-core-4.0.0-javadoc.jar.md5 2019-05-13 13:27 32 openapi-generator-core-4.0.0-javadoc.jar.sha1 2019-05-13 13:27 40 openapi-generator-core-4.0.0-sources.jar 2019-05-13 13:27 7164 openapi-generator-core-4.0.0-sources.jar.asc 2019-05-13 13:27 819 openapi-generator-core-4.0.0-sources.jar.md5 2019-05-13 13:27 32 openapi-generator-core-4.0.0-sources.jar.sha1 2019-05-13 13:27 40 openapi-generator-core-4.0.0.jar 2019-05-13 13:27 7255 openapi-generator-core-4.0.0.jar.asc 2019-05-13 13:27 819 openapi-generator-core-4.0.0.jar.md5 2019-05-13 13:27 32 openapi-generator-core-4.0.0.jar.sha1 2019-05-13 13:27 40 openapi-generator-core-4.0.0.pom…

Continue Reading Central Repository: org/openapitools/openapi-generator-core/4.0.0

Saxo Bank Developer Portal

On or shortly after April 1st. 2022 we will be introducing HTTP/2 and Akamai acceleration for Saxo Bank OpenAPI. We are doing this to optimize performance! About Akamai Akamai is a network acceleration provider, which ensures faster and more reliable connectivity from network endpoints to Saxo Banks data centers….

Continue Reading Saxo Bank Developer Portal

How to remove ApiUtil.java from openApi geneate task with openapi-generator-gradle-plugin:4.3.0

I have am using openapi-generator-gradle-plugin:4.3.0 to generate the api and models from a openApi-generate.yaml file. I have set skipDefaultInterface: “true” in configOptions, the default implementation of interfaces is not generated and ApiUtil.java is not used anywhere. (The default implementations used ApiUtil.java) What I want is to remove (disable the generation…

Continue Reading How to remove ApiUtil.java from openApi geneate task with openapi-generator-gradle-plugin:4.3.0

python – OpenAPI generation workaround for tuple list in FastAPI

For an API I am developing with FastAPI at the moment, I’m running into issues with nested tuples: from typing import Annotated from pydantic import BaseModel, NonNegativeInt, Field class SomeData(BaseModel): my_tuple_list_field: Annotated[ list[Tuple[NonNegativeInt, NonNegativeInt]], Field(description=”Some descriptive text to put into the API docs”) ] Note: I’m using mypy for type…

Continue Reading python – OpenAPI generation workaround for tuple list in FastAPI

OpenAPI Spec Validation policy fault string docume…

When the OpenAPI Spec Validation policy finds one or more validation errors it sets an informative error string (example below).  I’d like to be able to parse this into a well-defined error response, but can’t find documentation on all the possible strings.  Anyone know where this information is available?  Thanks…

Continue Reading OpenAPI Spec Validation policy fault string docume…

Containerization: Kubernetes 1.23 stabilizes operation with two network stacks

Kubernetes 1.23 is the third and final release of container orchestration this year. Among other things, it stabilizes the dual-stack operation in the cluster, the horizontal pod autoscaler and generic ephemeral volumes. With the new functions, initially introduced as alpha, the server-side validation of fields and the connection to OpenAPI…

Continue Reading Containerization: Kubernetes 1.23 stabilizes operation with two network stacks

OpenAPI – Poem Book

The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to RESTful 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, a consumer can understand and interact with the remote…

Continue Reading OpenAPI – Poem Book

python 3.x – With FastAPI, How to add charset to content-type (media-type) on request header on OpenAPI (Swagger) doc?

With FastAPI, How to add charset to content-type (media-type) on request header on OpenAPI (Swagger) doc? @app.post(“/”) def post_hello(username: str = Form(…)): return {“Hello”: username} OpenAPI (http:///docs) shows “application/x-www-form-urlencoded“. I tried to change like: def post_hello(username: str = Form(…, media_type=”application/x-www-form-urlencoded; charset=cp932″)): return {“Hello”: “World!”, “userName”: username} but not be add…

Continue Reading python 3.x – With FastAPI, How to add charset to content-type (media-type) on request header on OpenAPI (Swagger) doc?

Package – koa2-oas3-x

Requirements Node.js Version 8+ OpenAPI 3 Koa2 Usage const koa2OA3 = require(‘@overspeed/koa2-oas3’); const _ = require(‘koa-route’); const Koa = require(‘koa’); const app = new Koa(); const specUri = ‘https://api.swaggerhub.com/apis/overspeedio/Koa2Oas3Example/1.0.0’; // default options const koa2OA3Options = { mergeRemoteRefs: false, renderDocs: true, docsPath: ‘/docs’ }; // apply middleware koa2OA3(app, specUri, koa2OA3Options) .then(()…

Continue Reading Package – koa2-oas3-x

APITesting with OpenApi Specification file – Libraries

What the OpenApiDriver library will do is, based on the information in the openapi document, generate a test case for each endpoint + method + status_code. For each of these, it will automatically generated the required data (a valid url, valid parameters, valid body) based on the schema in the…

Continue Reading APITesting with OpenApi Specification file – Libraries

How to create an OpenAPI Specification

In the previous post I discussed how to generate classes from an Open API specification. In that article I mentioned how useful such a specification is for development. Not only does it clearly describe your API in a way that is readable, it can also be used by those developing…

Continue Reading How to create an OpenAPI Specification

spring boot – Hide a method in springdoc-openapi based on a condition

We are working on a spring boot project which uses the springdoc-openapi library to generate the swagger document. We have a requirement where we need to hide a few of the APIs in a controller. Spring boot does provide a way to hide/show a controller using the @ConditionalOnProperty tag. but…

Continue Reading spring boot – Hide a method in springdoc-openapi based on a condition