The OpenAPI specification for the Neynar APIs. Sign up for an API key on neynar.com.
We use Spectral to lint and validate our OpenAPI specifications. Spectral helps ensure that the OpenAPI files are compliant with the OpenAPI specification and follow best practices.
You can install Spectral globally using Yarn:
yarn global add @stoplight/spectral-cliTo validate an OpenAPI specification file using Spectral, run:
spectral lint src/v1/spec.yamlspectral lint src/v2/spec.yamlspectral lint src/hub-rest-api/spec.yamlSpectral will output any errors or warnings found in the specification files.
In addition to Spectral, you can use the Swagger CLI to validate your OpenAPI specifications.
You can install Swagger CLI globally using Yarn:
yarn global add swagger-cliTo validate an OpenAPI specification file using Swagger CLI, run:
v1
swagger-cli validate src/v1/spec.yamlv2
swagger-cli validate src/v2/spec.yamlhub-rest-api
swagger-cli validate src/hub-rest-api/spec.yamlThis will check for structural errors and report any issues.
We use OpenAPI Generator to generate client code from the OpenAPI specifications.
Prerequisite: Java must be installed.
Install OpenAPI Generator using Homebrew:
brew install openapi-generatoropenapi-generator generate -i src/v1/spec.yaml -g typescript-axios -o src/v1/swagger-tmpopenapi-generator generate -i src/v2/spec.yaml -g typescript-axios -o src/v2/swagger-tmpopenapi-generator generate -i src/hub-rest-api/spec.yaml -g typescript-axios -o src/hub-rest-api/swagger-tmpFor other languages, replace <generator> with a desired generator.