Spectral: How to correctly override oas3-unused-component targetting components.schemas.$ref?
Originally posted by user GableMike to the Stoplight Community on 08/10/2023 at 14:47 ET. I apologize if this is the wrong channel for this. I could not find anything explicitly related to spectral in this discord, though the spectral github support section links to this https://github.com/stoplightio/spectral#ℹ%EF%B8%8F-support Here is an edited version of my root OAS file: openapi: "3.1.0" servers: - url: https://api.com description: API info: title: API description: API contact: name: Engineering url: https://api.com email: engineers@api.com version: 0.0.1 paths: $ref: "paths/_index.yaml" components: schemas: $ref: "schemas/_index.yaml" tags: - name: api-keys Here is my spectral config file: extends: ["spectral:oas"] overrides: - files: - "main.yaml#components.schemas.$ref" rules: oas3-unused-component: "off" Here is the warning I am trying to suppress with the override: 17:11 warning oas3-unused-component Potentially unused component has been detected. components.schemas.$ref It does not suppress the warning. I don't understand why. I'd also like the linter to give more information on which parts of the component it thinks are not being used.Solved77Views0likes2Comments404 error when installing GitHub webhook
Originally posted by user Luca P. to the Stoplight Community on 07/11/2023 at 11:09 ET. Hi all, when I try to install a GitHub webhook for my project, I get an error stating: "Something went wrong while installing this webhook. You may not have the correct GitHub permissions to perform this action in your external VCS." As my permissions should be ok, I checked the raw /graphql API response, and it seems the error is a '404 not found': { "data": null, "errors": [ { "extensions": { "code": "INTERNAL_SERVER_ERROR", "message": "{\"message\":\"Not Found\",\"documentation_url\":\"https://docs.github.com/rest/webhooks/repos#list-repository-webhooks\"}" }, "path": [ "createExternalWebhook" ], "message": "Request failed with status code 404", "locations": [ { "line": 1, "column": 31 } ] } ] }Solved65Views0likes1Commentlinting yaml files with multiple documents in the yaml file
Originally posted by user ItsGameOvrMan to the Stoplight Community on 01/25/2023 at 14:32 ET. Trying to run against a yaml file: apiVersion: backstage.io/v1alpha1 kind: Domain metadata: name: demo-name title: A demo description: The Demo for spectral spec: owner: group:org-group --- apiVersion: backstage.io/v1alpha1 kind: Domain metadata: name: demo-name-2 title: A demo description: The Demo for spectral spec: owner: group:org-group Here is the ruleset: rules: metadata-name-kebab-case: description: Metadata name attribute should be kebab-case. message: "{{property}} should be kebab-case (lower-case and separated with hyphens)" severity: error given: $.metadata.name then: function: pattern functionOptions: match: "^(\/|[a-z0-9-.]+|{[a-zA-Z0-9_]+})+$" Getting an error: 1:1 error parser Expected a single document in the stream, but found more How can I have it run/apply to multiple documents within a yaml file or has this feature been removed?58Views0likes0CommentsCan I host generated stoplight frontend in my own servers?
Originally posted by user mukhamux to the Stoplight Community on 11/29/2022 at 09:40 ET. Hi, I generated beautiful API docs in stoplight service and want host it on my own servers. Are there any ways to do that? Can't find nothing about self-hosted models on the site.Solved57Views0likes1CommentIs Stoplight dead after SmartBear's acquisition?
Originally posted by user rdean to the Stoplight Community on 01/05/2024 at 08:47 ET. I haven't seen any real activity since the acquisition and I fear the worst. I truly hope not as Stoplight is far superior to any other openapi tool I've come across.Solved41Views0likes3CommentsFunction is not defined when trying to use Spectral
Originally posted by user zfa to the Stoplight Community on 08/01/2023 at 11:45 ET. When I try to run Spectral to lint a YAML file, I'm getting this error. However, what's shown on the screen is truncated, so it's impossible for me to figure out what's causing it. I have Spectral installed via Brew, and a defined ruleset in the root of my repo. Running Node 16.19.0/Yarn 8.19.3 on a Mac M1.Solved31Views0likes1CommentNested Masks don't seem to work
Originally posted by user MarcoDiSarno to the Stoplight Community on 03/07/2024 at 04:40 ET. I have the following use case for masking: Model A is referencing model B. (Garage.cars: array[Car] in the example) Then, a mask on the model A hides some fields and also needs to reference a mask on model B, since that also has some fields to mask. (GaragePublic.cars: array[CarPublic]) Stoplight lets me do that and I thought, "man, nice!" but when publishing the API, all these "nested masks" don't compile. Error: "Invalid JSON pointer: stoplight://resources/overrides/..." Plus, when I export the API with bundled references, it also just shows the "stoplight://resources/overrides/..." refs, which are useless outside of stoplight. The mock server also doesn't work for that project, I suspect for the same reason. Interestingly enough, it seems to work fine in the editor, just outside it doesn't.30Views1like0CommentsWill stoplight studio continue to be updated?
Originally posted by user rdean to the Stoplight Community on 08/15/2023 at 08:39 ET. Our team uses studio over web app since we can handle commits locally without needing to push every change to github. Do you plan to continue supporting studio with all the latest features? Even if it's a simple web wrapper around the web app, having the ability to work locally is much faster for us. However we're missing the latest features like masking that our team would like to use.Solved30Views0likes4Comments