Back to blog
Other

Mintlify Integration, Plan Validators, and Python Async Beta

Nolan Sullivan

Nolan Sullivan

July 24, 2024 ยท 3 min read

Mintlify Integration, Plan Validators, and Python Async Beta

Generation targets grow up so fast. You announce their alpha release, and before you know it, they're off to beta... And it's not only the Python Generator that's maturing.

The Mintlify integration is now self-serve, and Terraform Generation just got even more fully featured with the addition of OpenAPI-based Plan Validators.

Read on for the details!

Mintlify Integration - Now Self-Serve

Making your API documentation SDK-based is easier than ever with our Mintlify integration now available for self-serve.

  1. Select the SDKs you want to include in your docs.
  2. Point Speakeasy workflow at your Mintlify repo.

That's it! Now every new generation of your SDKs will automatically update your Mintlify repo.


Terraform Plan Validators

func (r *userResource) Schema(_ context.Context,
_ resource.SchemaRequest, resp *resource.SchemaResponse) {
  resp.Schema = schema.Schema{
    Attributes: map[string]schema.Attribute{
      "username": stringattribute.String{
        Required:    true,
        Description: "The username of the user.",
        Validators: []validator.String{
          stringvalidator.LengthBetween(6, 64),
          stringvalidator.RegexMatches(
            regexp.MustCompile(`^[a-z]+$`),
            "must contain only lowercase alphanumeric characters",
          ),
        },
      },
    },
  }
}

With the latest Speakeasy release, Terraform Provider generation will now automatically convert additional OAS validation properties into Terraform configuration validators. This will ensure that Terraform users will receive upfront feedback about invalid configurations before they are applied.

Automatic OAS -> Terraform validation now includes:

  • For string types: maxLength, minLength, and pattern
  • For integer types: maximum and minimum
  • For array types: maxItems, minItems, and uniqueItems

Refer to the docs for more on validation capabilities.

Python Beta Release: Pydantic & Async

Last changelog we announced the alpha release of our new Python Generator with support for Async & Pydantic models. We're now excited to announce the new generator is in beta!

All new SDKs will use the new generator by default. Existing production SDKs will be migrated by request.

For all the details on the new generator, read about our Python SDK design

๐Ÿ New Features and Bug Fixes ๐Ÿ›

Note

Based on the most recent CLI version: Speakeasy v1.345.0

The Platform

๐Ÿ Feat: SSE Sentinel - enables API builders to specify a sentinel which indicates that a streaming response has no more content to send.
๐Ÿ Feat: deepObject style Params now supported
๐Ÿ› Fix: Optional fields for error models are correctly marked.

TypeScript

๐Ÿ› Fix: Handle renamed object fields using x-speakeasy-name-override

Python

๐Ÿ Feat: Make Python unset falsy
๐Ÿ Feat: Support defaults and usage snippets for flattened request bodies
๐Ÿ› Fix: Fix handling of single member unions
๐Ÿ› Fix: Allow model_ prefixes on model fields
๐Ÿ› Fix: Handle renamed object fields using x-speakeasy-name-override
๐Ÿ› Fix: Added support for string unions

Terraform

๐Ÿ Feat: Plan modifiers created automatically from OpenAPI attributes
๐Ÿ Feat: Move custom plan modifiers to the same folder as the normal plan modifiers

C#

๐Ÿ Feat: Improve NuGet metadata

Go

๐Ÿ Feat: Add support for populating globals from env variables

Last updated on

AI everywhere.

Control here.