Documentation
¶
Index ¶
- Variables
- type Document
- type LanguageServer
- func (s *LanguageServer) HandleHover(params *protocol.HoverParams) (*protocol.Hover, error)
- func (s *LanguageServer) HandlePrepareRename(params *protocol.PrepareRenameParams) (*protocol.RangeWithPlaceholder, error)
- func (s *LanguageServer) HandleRename(params *protocol.RenameParams) (*protocol.WorkspaceEdit, error)
- func (s *LanguageServer) Validate(ctx context.Context, schema []byte) []protocol.Diagnostic
- type Logger
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNodeNotFound = errors.New("unable to find node at position") ErrNoDocumentationFound = errors.New("no documentation found") )
View Source
var (
DefaultTimeout = time.Minute
)
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct {
URI protocol.DocumentUri
RunningDiagnostic bool
Content string
ParsedDoc *openapi.OpenAPI // Parsed OpenAPI document
Index *openapi.Index // Document index for finding references
ParseErrors []error // Errors from parsing the document
ReservedChecker *oas.DynamicReservedChecker // Dynamic reserved property checker
}
type LanguageServer ¶
type LanguageServer struct {
Server *Server
// contains filtered or unexported fields
}
func NewSpeakeasyServer ¶
func NewSpeakeasyServer(version string, fs filesystem.FileSystem) *LanguageServer
func (*LanguageServer) HandleHover ¶
func (s *LanguageServer) HandleHover(params *protocol.HoverParams) (*protocol.Hover, error)
func (*LanguageServer) HandlePrepareRename ¶
func (s *LanguageServer) HandlePrepareRename(params *protocol.PrepareRenameParams) (*protocol.RangeWithPlaceholder, error)
func (*LanguageServer) HandleRename ¶
func (s *LanguageServer) HandleRename(params *protocol.RenameParams) (*protocol.WorkspaceEdit, error)
func (*LanguageServer) Validate ¶
func (s *LanguageServer) Validate(ctx context.Context, schema []byte) []protocol.Diagnostic
type Logger ¶
type Logger interface {
Error(message string, keysAndValues ...any)
Errorf(format string, args ...any)
Warning(message string, keysAndValues ...any)
Warningf(format string, args ...any)
Info(message string, keysAndValues ...any)
Infof(format string, args ...any)
Debug(message string, keysAndValues ...any)
Debugf(format string, args ...any)
}
Click to show internal directories.
Click to hide internal directories.