Comments (5)
@adamp01, so the clearing is expected behaviour: "The SDK generator will clear the output directory before generating the SDKs, to ensure old files are removed. If you have any files you want to keep you can place a ".genignore" file in the root of the output directory. The ".genignore" file follows the same syntax as a ".gitignore" file."
That said, I think it's pretty clear that it's not what a user would expect, so I will discuss with the team about changing the default behaviour to be more user friendly. Try outputting to ./sdks_out the problem should be fixed.
Regarding the issue you're seeing: "Error: failed to validate schema." this indicates there is something incorrect in the OpenAPI schema. I'll take a look through what you've posted above and will let you know what the issue is.
I'll respond back here when I have the answer.
from speakeasy.
Thanks @ndimares - I found the error (no thanks to an online validator which didn't pick it up).
- name: ''
in: query
schema:
type: string
example: ''
from speakeasy.
Yep just saw that one. @adamp01 There's one more as well. You need to define your tags at the root level:
openapi: 3.0.3
info:
title: NS Platform Public
version: 1.0.0
contact: {}
servers:
- url: https://platform.neuralspace.ai
- url: http://localhost
tags:
- name: Named Entity Recognition (NER)
description: A tag for grouping NER
- name: Project1
description: A tag for grouping project related things
paths:
/api/ner/v1/project:
After you fix that, it should work (I've got it working locally at least).
from speakeasy.
Also, happy to troubleshoot stuff here. Or if you prefer we have a community slack channel where we can help you. Whatever's your preference: https://join.slack.com/t/speakeasy-dev/shared_invite/zt-1cwb3flxz-lS5SyZxAsF_3NOq5xc8Cjw
from speakeasy.
@adamp01 per the bot above, we've released a new version of the CLI which includes a prompt:
Contents of ./sdk_out/python/ will be overwritten. Continue? [y/N]:
For the purposes of automation, you can also add a -y flag to skip the prompt entirely.
Closing this out.
from speakeasy.
Related Issues (20)
- [SPE-2828] [bug] python generator writes invalid dataclass if using params with and without default value HOT 2
- [SPE-2784] Support parametrised server urls in Terraform
- [SPE-2793] Default values set in the OAS are not set in Terraform Plans
- [SPE-2286] Java - v2, support x-speakeasy-pagination
- Question and Issue related to terraform generation HOT 4
- Runtime error generating SDK for security schemes HOT 1
- [SPE-2823] Support Set Attributes in Terraform HOT 2
- [SPE-2833] Set Module Path in Python SDK
- [SPE-2836] Terraform generation should preferentially work with application/json content types
- [SPE-2857] Custom Plan Validators Support in Terraform HOT 1
- [SPE-2889] Raw request and response access
- [SPE-2926] Capability to configure the default timeout in a generated terraform provider HOT 1
- [SPE-2960] Add support for response flattening
- [SPE-2959] Empty resource lists are being converted to null when imported, potentially by Terraform HOT 1
- [SPE-2982] Support suppressing examples from sdk docs
- [SPE-2983] The provided URL for the packageName config is invalid, and it should include the specific Python version in the URL
- [SPE-2996] Add `py.typed` file for typed python sdk
- [SPE-2928] Add query param or similar to API for content-type of uploaded file. Look into accepting user-defined content type for file upload
- [SPE-3040] Support Microsoft conventions for package names in C# HOT 1
- [SPE-3071] Support dynamic URLs in workflow
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from speakeasy.