Comments (4)
PETOSS-307
from xero-openapi.
Thanks for raising an issue, a ticket has been created to track your request
from xero-openapi.
In addition, after taking advice - I tried using redoc to reformat the YAML before parsing but that gets sad too:
$ redocly bundle --dereferenced xero_accounting.yaml > new.yaml
bundling xero_accounting.yaml...
📦 Created a bundle for xero_accounting.yaml at stdout 267ms.
$ go run github.com/getkin/kin-openapi/cmd/validate@latest -- new.yaml
2023/06/23 11:56:27 error converting YAML to JSON: yaml: anchor 'ref_20' value contains itself
exit status 1
from xero-openapi.
After the linked issue was solved I was able to generate types using oapi-codegen:
# install v2.0
$ go install github.com/deepmap/oapi-codegen/v2/cmd/[email protected]
# create config.yaml with circular reference limit (potentially can lower)
$ cat ./config.yaml
package: xero
generate:
models: true
compatibility:
circular-reference-limit: 10
# generate
$ oapi-codegen -config ./config.yaml xero_accounting.yaml > accounting.go
accounting.go
:
$ head -n 30 accounting.go
// Package xero provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/deepmap/oapi-codegen/v2 version v2.0.0 DO NOT EDIT.
package xero
import (
"bytes"
// snip
"github.com/oapi-codegen/runtime"
openapi_types "github.com/oapi-codegen/runtime/types"
)
const (
OAuth2Scopes = "OAuth2.Scopes"
)
// Defines values for AccountBankAccountType.
const (
AccountBankAccountTypeBANK AccountBankAccountType = "BANK"
AccountBankAccountTypeCREDITCARD AccountBankAccountType = "CREDITCARD"
AccountBankAccountTypeEmpty AccountBankAccountType = ""
AccountBankAccountTypeNONE AccountBankAccountType = "NONE"
from xero-openapi.
Related Issues (20)
- Missing POST BatchPayments
- Collect HOT 1
- Get Invoices paging with IDs HOT 6
- Couldn't create Credit Card account through XERO Accounting API HOT 1
- Github actions test issue HOT 1
- Another github action test with account outside of org HOT 1
- Actions test HOT 2
- more testing HOT 2
- test test test HOT 2
- test
- test HOT 2
- Create Invoice is missing eInvoicing Field HOT 2
- Country in Organisation Address HOT 1
- Asset Type definition inconsistent with Xero interface HOT 2
- Asset depreciationStartDate not setting HOT 2
- Empty array with status 200 is returned when calling /connections endpoints HOT 4
- AU Payroll API LeaveApplicationID changes when a request is in Scheduled status HOT 3
- LineItems: DiscountRate returned but DiscountAmount does not depending on invoice call query HOT 2
- Organisation Class enum values need updated HOT 3
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 xero-openapi.